Hi everyone! I’m trying to create a script that tweens a ImageGui when I press tab.
But when I press tab it says Unable to cast string to token
in the line 9
Here’s the script:
local TweenObj = script.Parent
local InputService= game:GetService("UserInputService")
local debounce = false
InputService.InputBegan:Connect(function(InputObject, Processed)
if InputObject.KeyCode == Enum.KeyCode.Tab then
if debounce then return end
debounce = true
TweenObj:TweenPosition(UDim2.new(0.767, 0), 'Out', 'Smooth', '1')
wait(1)
debounce = false
end
end)