Tween is pretty uncomfortable on a character, don’t use it too often.
Also I suppose you’re wrong at the goal CFrame, just type CFrame = primaryPart.CFrame
Not even an error shown in the console?
Ok I’m quite confused now, as you said before, I may think of a script like this
-- Note that this is a normal script
local Fox = ... -- ur fox
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(Char)
local NewFox = Fox:Clone
NewFox.CFrame ..... -- yours
NewFox.Humanoid:MoveTo(...)
end)
end)
That is all I can think of now, I don’t usually use local script on a character so I can’t help much.
Yeah, this works on a ServerScript but it’s not working on a LocalScript:
local fox = game.Workspace:WaitForChild("Fox")
local humanoid = fox:WaitForChild("Humanoid")
local foxPoint1 = game.Workspace:WaitForChild("PointE")
humanoid:MoveTo(foxPoint1.Position)
humanoid.MoveToFinished:Wait()
I explained to you in an earlier reply why that isn’t working in a LocalScript the way it is.
You’d have to create or clone the fox on the client itself, and then use MoveTo on its humanoid (not its root part) in a localscript, using a position/point (not a CFrame) as the first argument. Additionally, MoveTo takes another argument, which is a part that the point becomes relative to.
For example, if you do Fox:FindFirstChild(“Humanoid”):MoveTo(point, part) , then if the part moves, the point will relatively follow it.
Alternatively, if the network owner of the fox is set to the player on the server, then you can move it from a localscript in that player’s client, but in this case all other players will see the fox move, in which case it’d be better and more convenient to move it on the server.
The reason this happens is due to the network ownership of the part.
You’d need to add a couple of things to your code:
local fox = workspace:WaitForChild("Fox")
local foxPoint1 = workspace:WaitForChild("PointE")
local clientFox = fox:Clone()
clientFox.Parent = workspace
fox:Destroy()
local humanoid = clientFox:FindFirstChild("Humanoid")
humanoid:MoveTo(foxPoint1.Position)
humanoid.MoveToFinished:Wait()