Advertisement
Anukun_Lucifer

Script Block

Jun 23rd, 2023
1,361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | Gaming | 0 0
  1. script.Parent:WaitForChild("RemoteEvent")
  2. script.Parent.RemoteEvent.OnServerEvent:Connect(function(player,target,target_surface)
  3.     local block_clone = workspace.SandBlock:Clone()
  4.     block_clone.Parent = workspace
  5.     if target_surface == Enum.NormalId.Back then
  6.         block_clone.Position = target.Position + Vector3.new(0,0,4)
  7.     elseif target_surface == Enum.NormalId.Front then
  8.         block_clone.Position = target.Position + Vector3.new(0,0,-4)
  9.     elseif target_surface == Enum.NormalId.Top then
  10.         block_clone.Position = target.Position + Vector3.new(0,4,0)
  11.     elseif target_surface == Enum.NormalId.Bottom then
  12.         block_clone.Position = target.Position + Vector3.new(0,-4,0)
  13.     elseif target_surface == Enum.NormalId.Right then
  14.         block_clone.Position = target.Position + Vector3.new(4,0,0)
  15.     elseif target_surface == Enum.NormalId.Left then
  16.         block_clone.Position = target.Position + Vector3.new(-4,0,0)
  17.     end
  18. end)
Tags: game Roblox lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement