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

Why does the model fall apart and spawn in the wrong place?

Asked by
neoG457 315 Moderation Voter
9 years ago
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local debounce = false

Mouse.KeyDown:connect(function(key)
if key == "p" and not debounce then
debounce = true
local RinkakuModel = game.ReplicatedStorage.WorkspaceRinkakuModel:Clone() --Assuming the model is now in ReplicatedStorage

local   w = Instance.new('Weld')
w.Part0 = RinkakuModel.PrimaryPart
    w.Part1 = Player.Character.Torso
        w.Parent = RinkakuModel.PrimaryPart
            w.C0 = CFrame.new(0, 0, 0)

RinkakuModel.Parent = Player.Character
RinkakuModel:SetPrimaryPartCFrame(Player.Character.Torso.CFrame*CFrame.Angles(math.rad(Player.Character.Torso.Rotation.X),math.rad(Player.Character.Torso.Rotation.Y),math.rad(Player.Character.Torso.Rotation.Z)))

RinkakuModel:MakeJoints()
RinkakuModel.Name = Player.Name

end
    end)

This script should clone and weld a model in Replicated Storage onto my torso when I press "p" but instead it clones it where it was put into Replicated Storage and falls apart. I can't have it anchored because I wont be able to move with it while its welded to my Torso. So how do I make it clone at my back and be able to move with it welded to my while the model is unanchored. Please help?

The Script is a Local Script and I cant use a ServerScript because they dont work together.

0
Sorry If You cant see all of line 17 hover your mouse and click the page icon to open it in a Text Editor. neoG457 315 — 9y
0
My assumption is you don't have the necessary joints for the model to stick together in the first place. That's why my script wouldn't work for you, and that's why this one isn't working for you. aquathorn321 858 — 9y
0
Does "RinkakuModel" have a valid PrimaryPart? TheDarkOrganism 173 — 9y
0
Yes neoG457 315 — 9y

Answer this question