yo guys im having some problems with my script, and i DO NOT UNDERSTAND THE PROBLEM. btw i did not every local in here, because of to much text.
this is the code:
UIS.InputBegan:Connect(function(I,E) -- checkt of je niet aan het typen bent in de chat
if I.KeyCode == Enum.KeyCode.One then -- nu gaat er iets gebeuren als je muis 1 clikt
if E then return end
if character:FindFirstChild("Stunned") then return end
if special1cooldown == false then
game.ReplicatedStorage.MainEvent:FireServer("one")
local SharkBiteEffect = game.ReplicatedStorage.VFX.SharkBiteVFX:Clone()
SharkBiteEffect.Anchored = true
SharkBiteEffect.CFrame = character.HumanoidRootPart.RootAttachment.WorldCFrame
SharkBiteEffect.Parent = workspace.VFXclone
SharkBite:Play()
SharkBite:GetMarkerReachedSignal("BiteOne"):Connect(function(paramString)
for _, Particles in pairs(SharkBiteEffect:GetDescendants()) do
if Particles:IsA("ParticleEmitter") then
local emitCount = Particles:GetAttribute("EmitCount")
if emitCount then
Particles:Emit(emitCount)
else
warn("Emitter zonder EmitCount:", Particles:GetFullName())
end
end
end
end)
wait(0.6)
SharkBiteEffect:Destroy()
-- Speel animatie af
-- Cooldown
special1cooldown = true
wait(1)
special1cooldown = false
end
end
end)