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

Why will this only work in solo mode?

I put this into a regular script under a hopper bin, but for some reason it only works in solo mode.

function onButton1Down(mouse)
	local b = game.ReplicatedStorage.Torch:Clone()
	b.Parent = game.Workspace
	b.torchhandle.Position = mouse.Hit.p
	b.fireholder.Position=Vector3.new(b.torchhandle.Position.x,mouse.Hit.p.y+3.24900,b.torchhandle.Position.z)
end
 
function onSelected(mouse)
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
script.Parent.Selected:connect(onSelected)

2 comments

0

This a local script or script?

0

An ordinary script

1 answer

✓ Accepted answer

You're missing a 3rd argument on line 5, and it's syntactically incorrect by missing a closing parenthesis with Vector3. And you should always use a localscript with hopperbins.

1 comment

0

Thanks

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