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

[SOLVED] Event:Wait() function will break/cancel out wait(). Any solutions?

Asked by 3 years ago
Edited by Leamir 3 years ago

This question has been solved by the original poster.

Hey there! I have a bit of an engine question here. For whatever reason, using the Event:Wait() function will cancel out all future calls of wait(). If anyone could help that would be great.

local remote = Instance.new("RemoteEvent",game.ReplicatedStorage.AnimRemotes)
remote.Name = "ServerCall"
            game.ReplicatedStorage.AnimRemotes.CallClient:FireClient(attacker,remote,game.ReplicatedStorage.Anims.TestPunch)
remote.OnServerEvent:Wait()

print("received custom event")
target.HP.Value = target.HP.Value-1
wait(3)
print("wha")

(wha prints instantly without waiting.)

0
Is this a server or localscript? TheePBHST 154 — 3y
0
Server. pengalu200 65 — 3y

1 answer

Log in to vote
2
Answered by 3 years ago

I'm just stupid and was editing the wrong script... wow.

0
oof lol zane21225 243 — 3y
Ad

Answer this question