Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is the Model Placer working in Studio Mode Only?

Asked by 7 years ago

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)
0
Hopper Bins are deprecated you should use a tool instead. User#5423 17 — 7y
0
Yea There is `RequiresHandle` property set it to false and it will act like HopperBin personal_ly 151 — 7y
0
Did you write this in a regular "Script" Or "LocalScript", try writing this in local script if you didn't already yet awesomegamers200 72 — 7y
0
I did it in a normal script... now I tried local, Thankyou it works :) Goldenkings11 -11 — 7y

Answer this question