This works in the studio but when I try it in game, it doesn't work.
local pl = game.Players.LocalPlayer:FindFirstChild("PlayerGui") pl.IntroGui.Value.Value = 1
I tried using LocalScript, it didn't work at all.
I think game.Players.LocalPlayer
is the mistake but I can't figure it out.
Using game.Players.LocalPlayer, you will need a LocalScript.
According to one of your comments, you need your script to be in workspace. In that case, I recommend that you use RemoteEvents for Client-Server communication. Your serverscript will send a request to the Client which will execute that script.
Learn more about remote events HERE