Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent:WaitForChild("RemoteEvent")
- script.Parent.RemoteEvent.OnServerEvent:Connect(function(player,target,target_surface)
- local block_clone = workspace.SandBlock:Clone()
- block_clone.Parent = workspace
- if target_surface == Enum.NormalId.Back then
- block_clone.Position = target.Position + Vector3.new(0,0,4)
- elseif target_surface == Enum.NormalId.Front then
- block_clone.Position = target.Position + Vector3.new(0,0,-4)
- elseif target_surface == Enum.NormalId.Top then
- block_clone.Position = target.Position + Vector3.new(0,4,0)
- elseif target_surface == Enum.NormalId.Bottom then
- block_clone.Position = target.Position + Vector3.new(0,-4,0)
- elseif target_surface == Enum.NormalId.Right then
- block_clone.Position = target.Position + Vector3.new(4,0,0)
- elseif target_surface == Enum.NormalId.Left then
- block_clone.Position = target.Position + Vector3.new(-4,0,0)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement