Script only works in studio mode.
local name = game.Players.LocalPlayer.Name game.Workspace.Yeaa.Block.SurfaceGui.Frame.TextLabel.Text = name.. " is cool!" if game.Workspace.Yeaa.Block.SurfaceGui.Frame.TextLabel.Text == name.. " is cool!" then wait(4) game.Workspace.Yeaa:Remove() else game.Workspace.Yeaa.Block.SurfaceGui.Frame.TextLabel.Text = name.. " is cool!" end
``
From what I understand: First, game.Players.LocalPlayer can ONLY BE USED IN A LOCAL SCRIPT. a 'Local script' can only be used in StarterGui, StarterPlayer, or StarterPack( WITH THE EXCEPTION OF THE CHARACTER OF A PLAYER IN SOME INSTANCES.) What you COULD do is place the "Surface gui" with all the stuff, in PlayerGui. That would still work with the local script. All you would need to do is set the adorned as the Original part called 'Block' HOW YOU WOULD SET THE ADORNEE:
script.Parent.Adornee = game.Workspace.Yeaa.Block -- ( This would be in the local script located in the surface gui as the parent )
Full script:
script.Parent.Adornee = game.Workspace.Yeaa.Block local name = game.Players.LocalPlayer.Name script.Parent.Frame.TextLabel.Text = name .. " is cool!" if script.Parent.Frame.TextLabel.Text == name.. " is cool!" then wait(4) game.Workspace.Yeaa:Remove() else script.Parent.Frame.TextLabel.Text = name.. " is cool!" end
If anything doesn't work, just comment and I'll walk you through it.
'game.Players.LocalPlayer' can only be used in LocalScripts...
Dude I need you to accept this. I need to join the chat again :( plz it helps