Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Im trying to make a HINT system but there is an error and idk how to fix it?

Asked by 4 years ago
1game.Workspace.Trigger.Touched:Connect(function(hit)
2    script.Parent:TweenPosition(UDim2.new(0,0,0.85,0),"Out","Linear,0.5,true")
3    wait(5)
4    script.Parent:TweenPosition(UDim2.new(0,0,1,0),"Out","Linear,0.5,true")
5    script:Destroy()
6end)

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

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

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.

01game.Workspace.Trigger.Touched:Connect(function(hit)
02    script.Parent:TweenPosition(
03        UDim2.new(0,0,0.85,0),
04        "Out",
05        "Linear",
06        0.5,
07        true
08    )
09    wait(5)
10    script.Parent:TweenPosition(
11        UDim2.new(0,0,1,0),
12        "Out",
13        "Linear",
14        0.5,
15        true
16    )
17    script:Destroy()
18end)
Ad

Answer this question