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 4 years ago
Edited by Leamir 4 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 — 4y
0
Server. pengalu200 65 — 4y

1 answer

Log in to vote
2
Answered by 4 years ago

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

0
oof lol zane21225 243 — 4y
Ad

Answer this question