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

Whats Wrong With This Script?

Circle = game.Lighting.CircleMesh

function onTouched()
Circle:clone()
Name = "Mesh"
Parent = game.Workspace.Dough
end

script.Parent:connect(onTouched)

1 comment

0

What is the problem? Why is it not working? Do you have any Output? Please include what is wrong with the script, we can not simply look at the script and see the problem instantly, please include any kind of Output, or what is wrong with the script.

1 answer

Circle = game.Lighting.CircleMesh

function onTouched()
Circle:clone()
Name = "Mesh"
Parent = game.Workspace.Dough
end

script.Parent:connect(onTouched)

.It's not working because you haven't configured it's parent yet. Instead of Parent = you'd do Circle.Parent.

Circle:Clone()
Circle.Parent = game.Workspace

9 comments

0

Ok let me Try and ill get back to ya

0

That only Clone's 'Circle', then sets the Originals Parent to 'game.Workspace', you did not Identify the Cloned 'Circle'. :P

0

OK i Did "Circle = game.Lighting.CircleMesh function onTouched() Circle:clone() Circle.Name = game.Workspace.Dough end" But it didnt work

0

Because it is only Cloning 'Circle', he didn't identify the Cloned 'Circle', thus, the Cloned 'Circle''s Parent is set to nil, and the originals Parent is set to 'game.Workspace', also, consider using the 'WaitForChild' method. Don't worry, I'm not hating, just pointing out mistakes. :P

0

No...............

0

i mean here "Circle = game.Lighting.CircleMesh Dough = game.Workspace.Dough function onTouched() Circle:Clone() Circle.Parent = Dough end script.Parent:connect(onTouched)" i used this one

0

Do you have any Output? It'll give us a better understanding of the problem if you do, or if you explain what is wrong, that'll help even more.

0

i put output but its not working nothing pops up

0

By looking at the code, I now see the problem. You did not connect any event to the function [.Touched, .Changed, ect.].

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