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

Cant make selection box work on Cloned parts, help?

My part that i am cloning multiple times has SelectionBox object and this script in it:


box = script.Parent.SelectionBox

while true do
	wait(0)
	box.Adornee = script.Parent
	wait(0.5)
end


And under StarterGui i have LocalScript:

wait(1)

Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
local Part = game.Workspace.clonedparts.kockastone -- this is where i store new cloned parts

while true do
	if Mouse.Target == Part then
		Mouse.Target.SelectionBox.Visible = true
	else
		Part.SelectionBox.Visible = false
	end
	wait(0)
end

4 comments

0

Are they all named "part"?

0

no they are named kockastone , like the original one

0

Are you cloning the part on the client or the server?

0

Server i think, its all going into the Workspace

1 answer

I found the problem. As it turns out you crash the script if you call out

Part = game.Workspace.clonedparts.kockastone

multiple times, so i changed things and used

Part = script.Parent 

instead.

Thx for all your help!

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