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

Model spawnclick script?

Sorry if i am being a complete noob here but how to i make it when you click a button it spawns a certain model where you click?

1 comment

0

I will test it.

1 answer

✓ Accepted answer
--In a localscript in the player:

local Plr = game.Players.LocalPlayer
local Mouse = Plr:GetMouse()

local Model = game:GetService("Lighting").Model --Change this

Mouse.Button1Down:connect(function()
	if not pcall(function() local p = Mouse.Target end) then return end --Might stop the output being spammed...
	local NewModel = Model:clone()
	NewModel.Parent = workspace
	NewModel:MoveTo(Mouse.Target.Position)
end)

This might work, not really sure. I've not tested it or anything.

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