-
What do you want to achieve?
I’m trying to make a tweening shift to run script -
What is the issue?
I get this error saying “TweenInfo.new first argument expects a number for time.” -
What solutions have you tried so far?
I looked for solutions and people say that they need to replace brackets with parentheses which is what im using already
Here’s the script:
repeat wait() until game.Players.LocalPlayer
local start = 16
local goal = 32
local TweenService = game:GetService("TweenService")
local speed = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed
local tweeninfo = TweenInfo:new(
2,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out,
0,
false,
0
)
local tween = TweenService:Create(speed, tweeninfo, {speed = goal})
local tweenout = TweenService:Create(speed, tweeninfo, {speed = start})
m = game.Players.LocalPlayer:GetMouse()
m.KeyDown:connect(function(key)
if key == "304" then
tween:Play()
print("Works")
end
end)
m.KeyUp:connect(function(key)
if key == "304" then
tweenout:Play()
print("Works2")
end
end)
I’m actually still learning about Tweenservice and i didn’t know what’s the issue, but now i know, thank you!