Hi developers, i have a problem with my script, when i execute the script the rotation of the part doesnt works on the object, idk if its the CFrame or what but i need help
Video on Drive
Clone Script:
game.ReplicatedStorage.FireworkActivation.FireCrackerAct.OnServerEvent:Connect(function(Plr, HandleP, MechaP, PaloP, TallP, HandleCFrame)
local FireCracker = game.ReplicatedStorage.FireworksModels.FireCracker:Clone()
local Model = script.FireValue.Value.Handle
if(script.FireValue.Value.Anchor.Value == true) then -- Anchor Function (Ignore)
FireCracker.Tall.Anchored = true
else
FireCracker.Tall.Anchored = false
end
FireCracker.Parent = game.Workspace -- Parent
FireCracker:SetPrimaryPartCFrame(CFrame.new(HandleCFrame)) -- Firework position
end)
game.ReplicatedStorage.FireworkActivation.FireCrackerAnchor.OnServerEvent:Connect(function() -- Anchor Function (Ignore)
if(script.FireValue.Value.Anchor.Value == false) then
script.FireValue.Value.Anchor.Value = true
else
script.FireValue.Value.Anchor.Value = false
end
end)