- game.SterterGui.ScreenGui.Shop.LocalScript
```
local open = game.Workspace.openShop
local close = game.Workspace.closeShop
local frame = script.Parent
local closeButton = frame.closeButton
frame.Visible = false
local function shopMenu(hit)
local player = game.Players:FindFirstChild(hit.Parent.Name)
if player and player.PlayerGui.ScreenGui.Shop.Visible == false then
--print(player)
player.PlayerGui.ScreenGui.Shop.Visible = true
player.Character.Humanoid.WalkSpeed = 0
end
end
local function closeMenu()
local player = game.Players.LocalPlayer
if player and player.PlayerGui.ScreenGui.Shop.Visible == true then
--print(player)
player.PlayerGui.ScreenGui.Shop.Visible = false
player.Character.HumanoidRootPart.Orientation = close.Orientation
player.Character.HumanoidRootPart.CFrame = CFrame.new(close.Position.X, close.Position.Y+1, close.Position.Z)
player.Character.Humanoid.WalkSpeed = 16
end
end
open.Touched:Connect(shopMenu)
closeButton.MouseButton1Click:Connect(closeMenu)
```
'tech > game' 카테고리의 다른 글
21/07/28 Roblox Studio Tutorial (Script 포함) (0) | 2021.07.28 |
---|---|
21/07/28 How to Make a Roblox First Person Shooter (0) | 2021.07.28 |
21/07/28 ROBLOX Best Plugins (2021) (0) | 2021.07.28 |
21/07/27 ROBLOX httpservice 활용하여 http get/post이용 잔디 웹훅연결 (0) | 2021.07.27 |
21/07/27 로블록스 게임 만들기 #3/3 - 리오아빠 - Leo's Daddy (0) | 2021.07.27 |