Hello! I’m making crushing script, but I want my models spawn rotated normally.
Problem:
Local Script:
local Player = game.Players.LocalPlayer
local PlayerMouse = Player:GetMouse()
--[[
PlayerMouse.Hit.p = Tıklanan Pozisyon
.Target = Tıklanan Şey
]]
PlayerMouse.Button1Down:Connect(function()
game.ReplicatedStorage.RemoteEvents.SpawnCrusher:FireServer(script.Parent.Name, PlayerMouse.Hit,PlayerMouse.Target)
end)
Server Script:
local Crushers = game.ReplicatedStorage.Crushers
local Height = 30
game.ReplicatedStorage.RemoteEvents.SpawnCrusher.OnServerEvent:Connect(function(Player,CrusherName,Pos,Target)
if Target == game.Workspace.SafeZone then
print("ITS SAFEZONE!")
return
end
local NewCrusher = Crushers[CrusherName]:Clone()
NewCrusher.Parent = game.Workspace.WorkingCrushers
NewCrusher:SetPrimaryPartCFrame(Pos + Vector3.new(0,Height,0))
end)
Please help!
I want the model rotates straight to floor!