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:
game.Players[part.Partent.Name].PlayerGui.ScreenGui
and now you are in the screengui of the player do whatever you want then
Closed as Not Constructive by Leamir and cmgtotalyawesome
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?