Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to get enemy player in this situation?

Asked by 3 years ago

I have come upon a halt in my script.

There isn't any bugs or anything, its just I cant figure out how I can get it in this situation!

Here is the script:

01local EventE = game:GetService("ReplicatedStorage").Remotes.RemoteE
02local DisableAttack = game:GetService("ReplicatedStorage").SpecialRemotes.DisableAttack
03local EnableAttack = game:GetService("ReplicatedStorage").SpecialRemotes.EnableAttack
04local TweenService = game:GetService("TweenService")
05local Animations = script:FindFirstChild("Animations")
06local Sounds = script:FindFirstChild("Sounds")
07local Particles = script:FindFirstChild("Particles")
08local EDamage = 20
09 
10game:GetService("Players").PlayerAdded:Connect(function(player)
11    local cooldown = Instance.new("NumberValue")
12    cooldown.Value = tick()
13    cooldown.Name = "Cooldown"
14    cooldown.Parent = player
15end)
View all 94 lines...

The script is in ServerScriptService, and the script is a (very obvious) server script.

The problem is since I cant get the enemy player, I only have the player. This results in MORE problems including the player being unable to use a move after used. It's weird.

Any help would be appreciated!

For more detail in what any of this stuff is, please ask, and I can kindly provide.

Thank you for listening.

I hope I can count on you!

0
Isn't the enemy player just enemyPlr? rabbi99 714 — 3y
0
Yes, except the part that isnt working is Tween.Completed:Connect(function(). LikeableEmmec 470 — 3y
0
I FEEL SO DUMB!!! I didnt need the enemy player because the enemy player didnt exist in the first place! The enemy player only existant inside the hit function! LikeableEmmec 470 — 3y

Answer this question