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

Cloning parts into player? [UNANSWERED]

Asked by 9 years ago

Hello scripting helpers,

I recently just made a request to fix a script which now works slightly. However, not everything is fixed. LordDragonZord fixed the script for me. https://scriptinghelpers.org/questions/15815/cloning-parts-into-players-still-unanswered Thanks! However, on line 5, he added this line:-

walkeetalkee.CFrame = CFrame.new(pp.Position) --EDIT THIS

I asked him how to edit it and he said change the CFrame of the part to the head so the walkeetalkee isn't floating anywhere. I still didn't understand him and asked him again, he stated:- http://wiki.roblox.com/index.php?title=CFrame It's another version of changing the part's position, EXCEPT, It can clip into other parts and you can also change the camera's position I again still did not understand it.

What the script is supposed to do is clone tools in the backpack and the walkeetalkee to the players head. When I run the script, it does not error. However, the part gets cloned into the player but never stays as it flings.

Here is the script:-

game.Players.PlayerAdded:connect(function(p)
    p.CharacterAdded:connect(function(pp) -- This is fine
        local walkeetalkee = game.Workspace.WalkeeTalkee:Clone()
         walkeetalkee.Parent = pp.Head
        walkeetalkee.CFrame = CFrame.new(pp.Position) --EDIT THIS
          pp:MakeJoints()--Make joints so it sticks. Make the walkeetalkee have a weld.
                    game.ServerStorage.HRTools.Taser:Clone().Parent = p.Backpack
            game.ServerStorage.HRTools["HR Radio"]:Clone().Parent = p.Backpack
            game.ServerStorage.HRTools["HR Gun"]:Clone().Parent = p.Backpack
            game.ServerStorage.HRTools.Card:Clone().Parent = p.Backpack
    end)
end) 

Thanks if you help! ^^

1 answer

Log in to vote
0
Answered by
SanityMan 239 Moderation Voter
9 years ago

Try CFraming your walkeetalkee to the Position of another part in the pp/character such as the Torso.

 walkeetalkee.CFrame = CFrame.new(pp.Torso.Position)

I haven't tried it myself, so I don't know that it will work, but it is my best guess.

0
Hm, unfortunately. It doesn't work. Thanks for trying though! :] WelpNathan 307 — 9y
0
May I ask what the walkeetalkee does exactly? Does it play sound or do you just want it to be attached to the player? SanityMan 239 — 9y
0
Inside the walkeetalkee are different sounds what trigger when a value reaches a set limit. I would like the walkeetalkee to go under the players arms, but it doesn't matter if it's invisible in the player. :] WelpNathan 307 — 9y
0
In Workspace, is WalkeeTalkee a Model? SanityMan 239 — 9y
0
It's just a part. :] WelpNathan 307 — 9y
Ad

Answer this question