I am wanting it so when the player touches a certain part, it will effect a GUI. (In my case, change the transparency of the GUI.)
When the player touched it we want it to activate the GUI so use a Local Script and then do this:
workspace.NameOfPart.Touched:Connect(function() local plrname = game.Players.LocalPlayer.Name
and then activate the GUI:
game.Players[plrname]:FindFirstChild("Name of GUI").FrameTransparency = --Insert number
change names and stuff like that But not the plrname!!
I hope it helped!
well first you want to detect when a player hits the part
script.Parent.Touched:Connect(function(part) local h = part.Parent:FindFirstChild("Humanoid") if h ~= nil then --do anything end end)
and you can replace the "do anything" part with anything, in this case you want a gui to pop up
replace "do anything" with this:
and now you are in the screengui of the player do whatever you want then