1 | game.Workspace.Trigger.Touched:Connect( function (hit) |
2 | script.Parent:TweenPosition(UDim 2. new( 0 , 0 , 0.85 , 0 ), "Out" , "Linear,0.5,true" ) |
3 | wait( 5 ) |
4 | script.Parent:TweenPosition(UDim 2. new( 0 , 0 , 1 , 0 ), "Out" , "Linear,0.5,true" ) |
5 | script:Destroy() |
6 | 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.
01 | game.Workspace.Trigger.Touched:Connect( function (hit) |
02 | script.Parent:TweenPosition( |
03 | UDim 2. new( 0 , 0 , 0.85 , 0 ), |
04 | "Out" , |
05 | "Linear" , |
06 | 0.5 , |
07 | true |
08 | ) |
09 | wait( 5 ) |
10 | script.Parent:TweenPosition( |
11 | UDim 2. new( 0 , 0 , 1 , 0 ), |
12 | "Out" , |
13 | "Linear" , |
14 | 0.5 , |
15 | true |
16 | ) |
17 | script:Destroy() |
18 | end ) |