Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How come this does not clone?

I checked the parents and everything, no errors but it does not clone still.

I think I should use the player added function and have player inside the parentheseis at the end

Example (player)

Then would I just do player.Character?

Here is my original script that is in Workspace.

local object = script.Tooltip:Clone()

for i, v in pairs(game.Players:GetPlayers()) do
    if v.Character then
        object:Clone().Parent = v.Character.Torso
    end
end

1 answer

✓ Accepted answer
local object = script.Tooltip
 
game.Players.PlayerAdded:connect(function(player)
        object:Clone().Parent = game.Workspace:FindFirstChild(player.Name).Torso
end)

16 comments

0

It still does not make the Tooltips parent the players torso, When they join the game it should be added to all players torso's.

1

First let me ask- Is "Tooltip" a Child of Script?

0

Yes.

1

Just to make it more efficient, you should make Tooltip the Child of Script. Then you could just put "object = script.Parent:Clone()"

0

And when a player joins the game the 'Tooltip" should be cloned then be transfered into the Player.charecters torso.

1

Sorry- I said the wrong thing at the end of my answer. You have to make sure that Tooltip is Archivable or else it won't be cloned.

0

It is Archivable.

1

Try what I just edited into the end of my answer.

0

It says Character is a nil value?

1

Just a question, what is Tooltip? If it is a part, you will probably need a weld.

0

It's just a string value.

1

Try that now.

0

This method did not work either.

1

Now?

0

Line 4 attempt to index a nil value.

0

I found out a new way to do this, thanks for the help!

This discussion is preserved as it was. New answers, comments, and votes are closed.