Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- here a morph script that i found in freemodels which I just updated for my use
- Where morphpart is wherever the part of the model you want to attach to the body and character[bodypart] is where you want to attach the model, just set a variable called "bodypart" to whatever part of the body you want it to attach.
- just attach this to a key using UserInputService instead of keydown
- http://wiki.roblox.com/?title=API:Class/UserInputService
- if you cant make sense of this, youre probably better off learning more scripting for now instead of tackling this.
- MORPH SCRIPT =========================================================================
- local morphpart = game.ServerStorage["Equipped Items"][category][item][slot]:Clone()
- morphpart.Parent = character
- local C = morphpart:GetChildren()
- for i=1, #C do
- if C[i].className == "Part" or "Union" then
- local W = Instance.new("Weld")
- W.Part0 = morphpart.Middle
- W.Part1 = C[i]
- local CJ = CFrame.new(morphpart.Middle.Position)
- local C0 = morphpart.Middle.CFrame:inverse()*CJ
- local C1 = C[i].CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = morphpart.Middle
- end
- local Y = Instance.new("Weld")
- Y.Part0 = character[bodypart]
- Y.Part1 = morphpart.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = morphpart.Middle
- end
- local h = morphpart:GetChildren()
- for i = 1, # h do
- h[i].Anchored = false
- h[i].CanCollide = false
- end
Advertisement
Add Comment
Please, Sign In to add comment