I made a script where when the player presses a button its supposed to spawn a part on them that will move with them and be wielded on them, but its not working when i try it
event6.OnServerEvent:Connect(function(player)
print("fire")
if skilldebounce == false then
skilldebounce = true
print("waaah")
local character = player.Character
local hum = character.Humanoid
local waah = game.ServerStorage.CryModel:Clone()
waah.PrimaryPart.CFrame = character.UpperTorso.CFrame
waah.Body.Part0 = character.UpperTorso
waah.CryRange.Waaah.Playing = true
hum.WalkSpeed = 77
wait(6)
hum.WalkSpeed = 75
waah:Destroy()
waah.CryRange.Waaah.Playing = false
wait(2)
skilldebounce = false
end
end)
anyone know why?