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

Would I be able to make this move?

Asked by 8 years ago

I have a script that morphs the player into a model. How would I make the player move? It seems to be anchored to one spot and I can't even move the camera.

01local MorphName = "Derac"
02local MorphDirectory = game.ServerStorage
03 
04 
05 
06script.Parent.MorphButton.MouseButton1Down:connect(function()
07    local Character = game.Players.LocalPlayer.Character
08    if Character then
09        local TorsoPos = Character.Torso.CFrame.p
10        Character:ClearAllChildren()
11        local MorphClone = MorphDirectory[MorphName]:Clone()
12        for _,v in next,MorphClone:GetChildren() do
13            v.Parent = Character
14        end
15        Character:MoveTo(TorsoPos)
View all 29 lines...

1 answer

Log in to vote
2
Answered by 8 years ago
01script.Parent.MorphButton.MouseButton1Down:connect(function()
02local Character = game.Players.LocalPlayer.Character
03    if Character then
04        local TorsoPos = Character.Torso.CFrame.p
05        Character:ClearAllChildren()
06        local MorphClone = MorphDirectory[MorphName]:Clone()
07            for _,v in next,MorphClone:GetChildren() do
08                v.Parent = Character
09            end
10                Character:MoveTo(TorsoPos)
11            for x = 1,3 do
12                Character:MakeJoints()
13            end
14            for _,v in next,Character:GetChildren() do
15                if v.Anchored == true then
View all 24 lines...

Please use the Code Block next time for your script, it is very hard to read. This is for people if they want to read it easier.

0
Thank you very much. Sorry about that! Andromelus 0 — 8y
Ad

Answer this question