local mouse = game.Players.LocalPlayer:GetMouse() local off = false local plr = game.Players.LocalPlayer local UIS = game:GetService("UserInputService") local mat = Enum.Material.WoodPlanks local color = BrickColor.new("Br. yellowish orange") local eq = false script.Parent.Equipped:Connect(function() if mouse ~= nil then eq = true local gui = script.Parent.material:Clone() script.Parent.UsedGui.Value = gui gui.Parent = plr.PlayerGui local clonnedbrick = game.ReplicatedStorage.Brick:Clone() mouse.TargetFilter = clonnedbrick clonnedbrick.Transparency = 0.5 clonnedbrick.Parent = workspace while mouse ~= nil do clonnedbrick.Position = Vector3.new(math.floor(mouse.Hit.X / 4) *4,mouse.Hit.Y + 2,math.floor(mouse.Hit.Z / 4) * 4) clonnedbrick.Material = mat clonnedbrick.BrickColor = color wait() if off then clonnedbrick:Destroy() off = false break end end end end) script.Parent.Activated:Connect(function()
local pos = Vector3.new(math.floor(mouse.Hit.X / 4) *4,mouse.Hit.Y + 2,math.floor(mouse.Hit.Z / 4) * 4) script.Parent.RemoteEvent:FireServer(pos,mat,color)
end) I think its the vector3 there is something wrong with but i dont know what about it thats wrong (ithis is a local script there is also a script but i dont think its that but you get it anyways) script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr,pos,mat,C)
local brick = game.ReplicatedStorage.Brick:Clone() brick.Parent = workspace brick.CanCollide = true brick.Anchored = true brick.Position = pos brick.Name = plr.Name brick.Material = mat brick.BrickColor = C end)