So i made a tween gui that tweens when the player joins. but it's not tweening. Any help?
game.Players.PlayerAdded:Connect(function() wait(1) script.Parent:TweenPosition(UDim2.new(0, 0,0, 0)) end)
Maybe try this?
game.Players.PlayerAdded:Connect(function() wait(1) script.Parent:TweenPosition(UDim2.new(0, 0,0, 0),"Out",1,true) end)
You shouldn't be using game.Players.PlayerAdded
in a LocalScript to wait for the LocalPlayer to join because the LocalPlayer will have already joined by the time your script runs. You might be able to wait for their character to be added (game.Players.LocalPlayer.CharacterAdded:Wait()
), but otherwise just do your script:
wait(1) script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0))
In the future, add print
statements through-out your script so that you can now what is/isn't running. This will give you clues as to what's wrong. ex, in your case you might've done:
print("Script started") game.Players.PlayerAdded:Connect(function() print("PlayerAdded fired") wait(1) print("After wait") script.Parent:TweenPosition(UDim2.new(0, 0,0, 0)) print("After Tween") end) print("Script setup complete") --[[Output would be: Script started Script setup complete Which would tell you that what's wrong is the PlayerAdded line, not the Tween line. ]]