Fire spawns in studio fine, but not in-game?
01 | local plr = game.Players.LocalPlayer |
02 | local char = plr.Character |
03 | local firePart = game.ServerStorage.FireAttack |
04 | repeat wait() until char |
06 | function weld(part 1 , part 2 ) |
07 | local weld = Instance.new( "Weld" ) |
10 | weld.C 0 = part 1. CFrame:toObjectSpace(part 2. CFrame) |
15 | game:GetService( "UserInputService" ).InputBegan:connect( function (input,GPE) |
16 | local humanoid = char:FindFirstChild( "Humanoid" ) |
17 | if input.KeyCode = = Enum.KeyCode.One then |
18 | local fireCopy = firePart:Clone() |
19 | fireCopy.Parent = char [ "Right Arm" ] |
20 | local spin 1 Weld = weld(firePart.FakeArm, firePart.Spinner 1 ) |
21 | local spin 2 Weld = weld(firePart.FakeArm, firePart.Spinner 2 ) |
22 | firePart.FakeArm.CFrame = char [ "Right Arm" ] .CFrame |
24 | local weld = Instance.new( "Weld" , firePart) |
25 | weld.Part 1 = char [ "Right Arm" ] |
26 | weld.Part 0 = firePart.FakeArm |
27 | local lastTick = tick() |
28 | while (tick() - lastTick < 5 ) do |
30 | spin 1 Weld.C 1 = spin 1 Weld.C 1 * CFrame.Angles( 0.1 , 0 , 0 ) |
31 | spin 1 Weld.C 0 = spin 1 Weld.C 0 * CFrame.Angles( 0.1 , 0 , 0 ) |
33 | char [ "Right Arm" ] .FireAttack:Destroy() |
So basically this works fine in studio, but in-game the fire part just doesn't spawn at all