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 3 years ago
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

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 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.

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)


Ad

Answer this question