game.Workspace.Trigger.Touched:Connect(function(hit) script.Parent:TweenPosition(UDim2.new(0,0,0.85,0),"Out","Linear,0.5,true") wait(5) script.Parent:TweenPosition(UDim2.new(0,0,1,0),"Out","Linear,0.5,true") script:Destroy() end)
11:47:45.013 - Unable to cast string to token
11:47:45.014 - Stack Begin
11:47:45.014 - Script 'Players.superman20002007.PlayerGui.ScreenGui.TextLabel.LocalScript', Line 2
11:47:45.015 - Stack End
You made Linear
, 0.5
and true
to a string, add quotation marks only for the Linear
and it should be fixed. If you are still confused, here's how should it be.
game.Workspace.Trigger.Touched:Connect(function(hit) script.Parent:TweenPosition( UDim2.new(0,0,0.85,0), "Out", "Linear", 0.5, true ) wait(5) script.Parent:TweenPosition( UDim2.new(0,0,1,0), "Out", "Linear", 0.5, true ) script:Destroy() end)