filmov
tv
How to make a GUI OPEN when a part is TOUCHED | Roblox Studio Tutorial

Показать описание
In todays video I show you how to make a system where when a player touches a part a GUI opens, this type of system is used in so many different games, simulators, tycoons, obbys and even hangouts, this system is a great addition to your game to display any type of GUI. I really enjoy making these videos for you all so I hope you enjoy them just as much as I do!
Have a lovely rest of your day!
If you are a bit confused what to do, Feel free to create a ticket in my discord server and we can help you out!
Script 1: (Opening the gui)
local TouchPart = game.Workspace:WaitForChild("TouchPart") -- Change Part to whatever your part is called which a player will need to touch
local gui = script.Parent
TouchPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent == game.Players.LocalPlayer.Character then
gui.Visible = true
print("Gui opened")
end
end)
-- Made with love by Floppy
-----------
Script 2 (Closing Script)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
end)
-- Made with love by Floppy
-----------------------
If you would like to support me even more, Super Thanks and becoming a Member is also another way to show your appreciation!
Roblox Studio Tutorial
Roblox Studio
Studio Tutorials
Have a lovely rest of your day!
If you are a bit confused what to do, Feel free to create a ticket in my discord server and we can help you out!
Script 1: (Opening the gui)
local TouchPart = game.Workspace:WaitForChild("TouchPart") -- Change Part to whatever your part is called which a player will need to touch
local gui = script.Parent
TouchPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent == game.Players.LocalPlayer.Character then
gui.Visible = true
print("Gui opened")
end
end)
-- Made with love by Floppy
-----------
Script 2 (Closing Script)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
end)
-- Made with love by Floppy
-----------------------
If you would like to support me even more, Super Thanks and becoming a Member is also another way to show your appreciation!
Roblox Studio Tutorial
Roblox Studio
Studio Tutorials
Комментарии