Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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.)

2 comments

0

Is this a server or localscript?

0

Server.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.