I have a tween running that makes a model circle around a bunch of parts - but when it runs on the client, it doesn’t work. The intention is for this to only work on the client.
This is how it runs on the server, on the client, he just stays completely still.
The LocalScript is parented to StarterGui, figured I should make that clear - it’s not a wrong parent as far as I’m aware.
local part = workspace:WaitForChild("Freddy")
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Linear)
local current
local partTable = workspace.WalkPoints:GetChildren()
chosenRandomPosition = partTable[math.random(1, #partTable)]
part.PrimaryPart.CFrame = chosenRandomPosition.CFrame
currentPos = chosenRandomPosition
while true do
local nextArea = currentPos.Left.Value
local tween = TweenService:Create(part.PrimaryPart, tweenInfo, {
Position = workspace.WalkPoints:FindFirstChild(nextArea).Position
})
tween:Play()
tween.Completed:Wait()
currentPos = workspace.WalkPoints:FindFirstChild(nextArea)
task.wait(1)
end
This is what the WalkPoints folder is, it basically pulls a string and moves to that direction, except, it should move it on the client - but it does only on the server.
Any help would be much appreciated - I’m just, really confused as to why it doesn’t work on the client, yet it does on the server.
EDIT: Any other TweenService script seems to run completely fine, I used prints and it returns values just fine, the only issue is just, this specific tween not running whatsoever.
Is it a complete copy of the code that worked on the server? Such as you just made a local script and copied and pasted the code straight from the server script?
A string - it finds another part within the table of walk points, it will then grab it’s position, move there, and find the left value in there, and continue to loop from there.
Something I’ve just noticed is that, the position changes - it just isn’t, shown.
I used a print to detect the model’s position changing, and it apparently DOES move around, just, the model doesn’t move around in actual viewing?