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

I made a script just for fun and it won't work!?

local player = game.Players.LocalPlayer
local character = player.Character

function lagPart()
	local p = character.Torso:clone()
	p.parent = game.Workspace
end

while true do
	lagPart()
	wait(0.01)
end

I know I have every detail right, as it gives no errors, so why does it not clone my player's torso when I join in Studio Testing mode? (AKA the "Test" button with the big green arrow).

I only wanted to use this script as something fun for a place, as I have another script which does work that clears every block in workspace except you and the baseplate every 30 seconds.

2 comments

0

Is this a LocalScript; try repeat wait() until player.Character inbetween line 1 and 2 if so

0

it is a local script, i will try that

1 answer

You have to capitalize the word "parent", but you didn't!

local player = game.Players.LocalPlayer
local character = player.Character

function lagPart()
    local p = character.Torso:clone()
    p.Parent = game.Workspace -- captialized
end

while true do
    lagPart()
    wait(0.01)
end

If it still doesn't work, make sure that: You enabled R6, not R15 You're using a local script

3 comments

0

Did what yu said, it still didn't solve my problem.

0

hmmm.. let me try to fix that

0

it works for me. Make sure that there isn't R15 and your using a local script

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