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

This script surpisely shuts down my server Can anyone help me?

Asked by 9 years ago

This is to spawn a model so it's in HopperBin so I have no idea what is going on?

bin = script.Parent

function onButton1Down(mouse)

    local model = bin.Model:clone() --Change "Model" to What Ever Model Name You Have

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

end

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

bin.Selected:connect(onSelected)

1 answer

Log in to vote
0
Answered by 9 years ago

I did not get any errors on a clean server

Click Her For Test Server

This is a local script

bin = script.Parent

function onButton1Down(mouse)

    local model = bin.Model:clone() --Change "Model" to What Ever Model Name You Have

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

end

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

bin.Selected:connect(onSelected)
Ad

Answer this question