Issue
I want to tween an image label inside a module script. The basics; however output keeps printing " [Unable to cast token to token]"
Here’s my script
function module.movefly(fly, info)
local ud = UDim2.new(UDim.new(tonumber(GUI["Fly"..fly].Position.X.Scale),0),0,0)
print(ud)
print(typeof(ud))
print(GUI["Fly"..fly].Position.X.Scale)
if Values[fly] == 3 then
Values[fly] = 2
t:Create(script.Parent["Fly"..fly].Value, info, {Value = script.Parent["Fly"..fly]:GetPrimaryPartCFrame() * CFrame.new(0,50,0)}):Play()
GUI["Fly"..fly]:TweenPosition(ud, info.EasingStyle, info.EasingDirection, info.Time)
wait(info.Time)
Values[fly] = 1
end
end
Output
[{0, 0}, {0, 0}]
[0]
[15:18:07.562 - Unable to cast token to token]
Now this isn’t my first version of the script, I’ve been changing it to try different ways.
What the script here does is tween a model (through a CFrameValue) and tween the image indicator showing where it is on a surface gui.