I tried to make a whiteThunderRasengan script it worked a bit at the start(only animation would run, it won't create the Rasengan idk why) then I added debounce but it still doesn't wait for it to be finished to do anything else.
Here's the code:
local RS = game:GetService("ReplicatedStorage") local RE = RS.boll local debounce = false RE.onServerEvent:Connect(function(player) if debounce then debounce = true local char = player.Character local hum = char:WaitForChild("Humanoid") local animation = Instance.new("Animation", workspace) animation.AnimationId = "http://www.roblox.com/Asset?ID=4803113473" local animTrack = hum:LoadAnimation(animation) animTrack:Play() local whiteThunderRasengan = Instance.new("Part", player) whiteThunderRasengan.Shape = "Ball" whiteThunderRasengan.Color = Color3.fromRGB(255,255,255) whiteThunderRasengan.Anchored = true whiteThunderRasengan.CanCollide = false whiteThunderRasengan.Massless = true whiteThunderRasengan.Material = "Neon" whiteThunderRasengan.Size = Vector3.new(2,2,2) whiteThunderRasengan.Orientation = char:WaitForChild("Left Arm").Position whiteThunderRasengan.Position = char:WaitForChild("Left Arm").Position debounce = false end end)
What should I do?
The issue here is, that you only check if debounce EXISTS. You want to check the value, too.
Edit: I figured out what's wrong! The issue is, you create the part in the player, not the character!
I've also updated the script, hope it works!
local RS = game:GetService("ReplicatedStorage") local RE = RS.boll local debounce = false RE.onServerEvent:Connect(function(player) if debounce == false then debounce = true local char = player.Character local hum = char:WaitForChild("Humanoid") local animation = Instance.new("Animation", workspace) animation.AnimationId = "http://www.roblox.com/Asset?ID=4803113473" local animTrack = hum:LoadAnimation(animation) animTrack:Play() local whiteThunderRasengan = Instance.new("Part", char) whiteThunderRasengan.Shape = "Ball" whiteThunderRasengan.Color = Color3.fromRGB(255,255,255) whiteThunderRasengan.Anchored = true whiteThunderRasengan.CanCollide = false whiteThunderRasengan.Massless = true whiteThunderRasengan.Material = "Neon" whiteThunderRasengan.Size = Vector3.new(2,2,2) whiteThunderRasengan.Orientation = char:WaitForChild("Left Arm").Position whiteThunderRasengan.Position = char:WaitForChild("Left Arm").Position debounce = false else print("waiting..") end end)