Dev_Cron
(Dev_Cron)
July 22, 2020, 12:28pm
1
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:
Can someone help me, please?
Suuzv
(Legoshi)
July 22, 2020, 12:29pm
2
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
Dev_Cron
(Dev_Cron)
July 22, 2020, 12:36pm
4
Now It’s with
I’m a new developer and I’m learning…
Suuzv
(Legoshi)
July 22, 2020, 12:36pm
5
you typed plr instead of the actual variable Player that you typed above
Player:GetMouse().KeyDown:Connect(function(K)