Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)


This discussion is preserved as it was. New answers, comments, and votes are closed.