Server Script:
game.ReplicatedStorage.Remotes.BarrierPlace.OnServerEvent:Connect(function(player, CFrameValue, PositionValue)
local Character = player.Character
Character.Humanoid.WalkSpeed = 0
local Clone = game.Lighting.RoadBarrier:Clone()
Clone.Parent = game.Workspace
Clone.CFrame = CFrameValue
Clone.Position = PositionValue
Character.Humanoid.WalkSpeed = 16
end)
Local Script:
local Tool = script.Parent
function onButton1Down(mouse)
local nextname = "Road Barrier"
local bin = script.Parent
function onButton1Down(mouse)
local PositionValue = script.Parent.Place.Position
game.ReplicatedStorage.Remotes.BarrierPlace:FireServer(bin.Place.CFrame, PositionValue)
end
end
function onEquipped(mouse)
if mouse == nil then
print("Mouse Not Found!")
return
end
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
script.Parent.Equipped:connect(onEquipped)
This is what is happening; https://gyazo.com/391e206290c94a25660dcb0b7e3e6ad0

1 comment
Try using CFrame.Angles and see if that fixes it, it looks like your angles are offset, for example: (line 8 server script) Clone.CFrame = CFrameValue * CFrame.Angles(angles)