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

How come this does not clone?

Asked by 10 years ago

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

Log in to vote
1
Answered by
c0des 207 Moderation Voter
10 years ago
local object = script.Tooltip

game.Players.PlayerAdded:connect(function(player)
        object:Clone().Parent = game.Workspace:FindFirstChild(player.Name).Torso
end)
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. IntellectualBeing 430 — 10y
1
First let me ask- Is "Tooltip" a Child of Script? c0des 207 — 10y
0
Yes. IntellectualBeing 430 — 10y
1
Just to make it more efficient, you should make Tooltip the Child of Script. Then you could just put "object = script.Parent:Clone()" c0des 207 — 10y
View all comments (12 more)
0
And when a player joins the game the 'Tooltip" should be cloned then be transfered into the Player.charecters torso. IntellectualBeing 430 — 10y
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. c0des 207 — 10y
0
It is Archivable. IntellectualBeing 430 — 10y
1
Try what I just edited into the end of my answer. c0des 207 — 10y
0
It says Character is a nil value? IntellectualBeing 430 — 10y
1
Just a question, what is Tooltip? If it is a part, you will probably need a weld. c0des 207 — 10y
0
It's just a string value. IntellectualBeing 430 — 10y
1
Try that now. c0des 207 — 10y
0
This method did not work either. IntellectualBeing 430 — 10y
1
Now? c0des 207 — 10y
0
Line 4 attempt to index a nil value. IntellectualBeing 430 — 10y
0
I found out a new way to do this, thanks for the help! IntellectualBeing 430 — 10y
Ad

Answer this question