Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What could cause inconsistent tweening?

Asked by
Macbane 46
5 years ago
        local DISTANCE = (TOOL.Handle.CFrame.p - Fposition).magnitude
        local RAY_checkamount = distance/20
        local TIME =DISTANCE/450
        local TweenService = game:GetService("TweenService")

        local goal = {}
        goal.Position = MOUSE_pos
        local tweenInfo = TweenInfo.new(TIME, Enum.EasingStyle.Linear)
        local tween = TweenService:Create(BULLET, tweenInfo, goal)
        tween:Play()

These are some gifs of what happens. The first one is when I click on a dummy's head at certain spots the bullet goes extremely slow. The second is the bullet goes slightly slower when I click water terrain, https://gyazo.com/9cc2eeafade6c9be3c4f528ae93cb198 https://gyazo.com/58687f1d4d913b061c6ca0d6fb033c3b

0
clicking in the void also makes the bullet go super fast Macbane 46 — 5y
0
TIME =DISTANCE/450 -- TIME is actually the velocity, but it is named TIME because it is used in the tweening to determine the amount of time needed to reach its goal. Macbane 46 — 5y
0
have you tried printing `DISTANCE` and `TIME` while shooting at the spot on the characters head that makes it go slow? chomboghai 2044 — 5y
0
0 When I click that position on the char's head that makes it go so the distance is set to max 1000 and time ~2.2secs. When I click on the water it does a very weird thing where from 30 studs it the distance clicking on water will become less when its clicked farther but in water such as 27. When clicked somewhere that's like 235 studs far, when you click in the water it'll become 260. Macbane 46 — 5y

Answer this question