Your Problem
You never make a conditional for the Tweening to activate. So it's going to activate reguardless of what the player chats.
Also, I see this is in a gui. You shouldn't have the PlayerAdded event inside of the client - e.g a GUi
How To Fix
Have an if statement before the gui tweening to check if what the player said was equivilent to the preset 'Message' variable. Also, you shouldn't have the Message variable have the same identity of the parameter for your Chatted event, they'll overlap.
Make a serverscript in workspace for the PlayerAdded event, then index the gui from their PlayerGui with the Chatted Event.
Code
local message = "/jobs"
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(chat)
if chat:lower() == message then
local gui = plr.PlayerGui
GUI:TweenPosition(UDim2.new(0, -200, 0, 5),"Out", "Quad", 3, true)
wait(1.5)
GUI:TweenPosition(UDim2.new(0, 5, 0, 5), "Out", "Quad", 3, false)
end
end)
end)
1 comment
Where is this script located?