I am making a new game called "Clash of Roblox 2" and I want to make it where you buy a model "Gold Mine Level 1" and you get the tool from a tool collector one time only... I got that part covered, but I am testing the Gold Mine placer where you click somewhere and it places a Gold Mine, but on Studio Mode it runs smoothly and on Player Mode on the actual game it does not! Why?!

What I Did!

  1. In Starter Pack
  2. Hopper Bin Tool
  3. Inside Hopper Bin Tool is a Spawner Script and then a Figure Model
  4. Inside the Figure Model is the "Gold Mine"
  5. Studio Mode it Places
  6. Player Mode it doesn't!

Spawner Script

bin = script.Parent

function onButton1Down(mouse)

	local model = bin.Figure:clone() --- "Figure" = Name of model

	model.Parent = game.Workspace
	model:MakeJoints()
	model:MoveTo(mouse.hit.p)
	script.Parent:Remove()

end

function onSelected(mouse)
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

bin.Selected:connect(onSelected)

4 comments

0

Hopper Bins are deprecated you should use a tool instead.

0

Yea There is RequiresHandle property set it to false and it will act like HopperBin

0

Did you write this in a regular "Script" Or "LocalScript", try writing this in local script if you didn't already yet

0

I did it in a normal script... now I tried local, Thankyou it works :)