Why does this script not work? (Test)

bin = script.Parent

function onButton1Down(mouse)

local model = bin.Pwnset:clone() 

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

end

function onSelected(mouse)
mouse.Icon = “rbxasset://textures\ArrowCursor.png”
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

bin.Selected:connect(onSelected)

Sir, you have to do a better job with the script. It’s extremely hard to read because not all of it is in the code block. If you really want help, at least explain the errors, or what you’re trying to do, please.

Please explain what on earth does this script do

Plus it looks like those free model scripts that well sucks

A better view of the script:

bin = script.Parent

function onButton1Down(mouse)

	local model = bin.Pwnset:clone() 

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

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

bin.Selected:connect(onSelected)

Also, what exactly doesn’t work? Could you please specify the issue?

1 Like

Sending code alone is not helpful. You did not describe what your problem with it is. If you want us to help you, you must help us too by lending us details.

2 Likes

It’s been a while since I last did functions but I think this is the issue?


bin = script.Parent

function onButton1Down(mouse)

	local model = bin.Pwnset:clone() 

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

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

bin.Selected:connect(function(onSelected) --here yes

Correct me if I’m wrong.

1 Like

Im asking what is wrong with it just observe it, its a test.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.