It's NOT a localscript the error code: attempt to index nil with 'PlayerGui'
The script
function onClicked()
local c = game.Players:GetChildren()
for i = 1, #c do
c[i].Character.UpperTorso.CFrame = CFrame.new(script.Parent.Parent.Teleport.Position)
end
player.PlayerGui.Tasksbar.t1.Visible = true -- the gui
player.PlayerGui.Tasksbar.t2.Visible = true -- gui
player.PlayerGui.Tasksbar.t3.Visible = true -- gui
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
####Re-edited by JesseSong!

7 comments
Well, you have not shown how you are assigning player variable.
Player has not been referenced.
You can check your previous question which has been answered effectively by me here https://scriptinghelpers.org/questions/114769/attempt-to-index-nil-with-playergui-how-do-i-fix-it
ClickDetector mouseClick event returns player who clicked as it's first argument, you can just do function onClicked(player)
You can use function onClicked(player) since mouseclick event returns a player, but you need to reference the player if you want to do other tasks other than a clickdetector.
After realising your vigorous mistakes, I've noticed that this is not a localscript GUI's only run on the local player's client, therefore the whole script is incorrect. Also you need to define the player variable e.g. local player = game.Players.LocalPlayer
so how do i do it