Im 100% sure i have messed it up it doesnt place anything what im trying to do is making it place a model where my mouse is but it doesnt work
local mouse = game.Players.LocalPlayer:GetMouse()
local off = false
local plr = game.Players.LocalPlayer
local eq = false
script.Parent.Equipped:Connect(function()
if mouse ~= nil then
eq = true
local clonnedbrick = game.ReplicatedStorage.Brick:Clone()
mouse.TargetFilter = clonnedbrick
clonnedbrick.Transparency = .5
clonnedbrick.Parent = workspace
clonnedbrick:GetPrimaryPartCFrame(clonnedbrick:SetPrimaryPartCFrame(mouse))
while mouse ~= nil do
clonnedbrick.Position = mouse.Hit.p + Vector3.new(0,2,0)
wait()
if off then
clonnedbrick:Destroy()
off = false
break
end
end
end
end)
script.Parent.Activated:Connect(function()
local pos = mouse.Hit.p + Vector3.new(0,2,0)
script.Parent.RemoteEvent:FireServer(plr,pos)
end)
script.Parent.Unequipped:Connect(function()
eq = false
off = true
end)

1 comment
u dint include the server script look on line 28 it says fire server what is on the server script?