Whats wrong with it?????
script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local playercharacter = hit.Parent.Name local player = game.Players:FindFirstChild(playercharacter) local gui = player.PlayerGui.FinallyWater gui.Enabled = true end end)
Maybe you're using the wrong type of script, such as a ModuleScript
or a LocalScript
.
Do you have Filtering Enabled on? If so, the server cannot look inside the Player's Gui folder to enable the FinallyWater gui. The reason it is working in studio is because you are probably using the normal testing mode, where the client and server are the same thing, thus enabling the server to access the client's PlayerGui folder.
The best way to test your games when using FE, as everybody should be, is to create the local server under the testing tab. If you do this, the script probably won't be working.
The best way to handle the task you're trying to accomplish is with RemoteEvents, which you can find help on here.