I need some help to script my GUI

So I’m making a GUI when you’re pressing “e” It’s will pop up with TweenPosition.

But It’s won’t work I really don’t know why.

The script is:

local Player = game.Player.LocalPlayer
local TextLabel = script.Parent.TextLabel

plr:GetMouse().KeyDown:Connect(function(K)
if K == “e” then
script.Parent.Visible = true
TextLabel:TweenPosition(
UDim2.new(.229, 0,0.727, 0),
“Out”,
“Elastic”,
1,
false
)

	end 
end)

But when I’m joining to test it It’s says on the output:

Support

Can someone help me, please?

You wrote Player instead of Players
Add a S

local Player = game.Players.LocalPlayer
1 Like

The reason you’re getting this error on Line 1 is because you’ve said game.Player.LocalPlayer.

To reference to the LocalPlayer, you must say game.Players.LocalPlayer (adding an S onto the end of player) as it will be referencing to the players, then the LocalPlayer.

1 Like

Now It’s with support2

I’m a new developer and I’m learning…

you typed plr instead of the actual variable Player that you typed above

Player:GetMouse().KeyDown:Connect(function(K)