I am trying to make this script place a block, but when I hit the correct button, nothing happens (Yes selected has a value, game.Lighting.1) Here is the script:
--LocalScript
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local Placing = false
local Already = false
function Place()
local Xpos = Mouse.Target.Position.X
local Ypos = Mouse.Target.Position.Y
local Zpos = Mouse.Target.Position.Z
local Surface = Mouse.TargetSurface
local TargetPos = Mouse.Target.Position
local Selected = game.Players.LocalPlayer.Selected.Value
local Clone = Selected:Clone()
Clone.Position = Vector3.new(TargetPos)
if Surface == 1 then
Clone.Position = Vector3.new(Xpos, Ypos + 4, Zpos)
else
if Surface == 4 then
Clone.Position = Vector3.new(Xpos, Ypos - 4, Zpos)
else
if Surface == 3 then
Clone.Position = Vector3.new(Xpos - 4, Ypos, Zpos)
else
if Surface == 0 then
Clone.Position = Vector3.new(Xpos + 4, Ypos, Zpos)
else
if Surface == 2 then
Clone.Position = Vector3.new(Xpos, Ypos, ZPos + 4)
if Surface == 5 then
Clone.Position = Vector3.new(Xpos, Ypos, Zpos - 4)
else
print(" ")
end
end
end
end
end
end
end
Mouse.Button2Down:connect(function()
local Find = Mouse.Target:FindFirstChild("Xplo")
if not Already then
Already = true
Placing = true
if Find then
while true do
wait(1)
if Placing == true then
Place()
else
print(" ")
end
end
end
end
end)
Mouse.Button2Up:connect(function()
Already = false
Placing = false
end)

7 comments
You have to clone on the server for it to replicate! Remember to use Remotes
What? This does not have FilteringEnabled.
I do not condone, nor suggest, non-FE game development. But also it seems like you never parented the clone.
Oh. Thanks for that! I keep forgetting!
Nevermind, still nothing happens.
You put Clone.Parent = game.Workspace and nothing happens? (also a tip: you dont need to put else all those times. you can either make them all seperate if statements and remove all the elses which are currently serving no purpose, or you can combine them to "elseif" and only use one end)
I tryed that and it still wont work