Infinite yield possible on 'Workspace:WaitForChild("part")'

Infinite yield possible on ‘Workspace:WaitForChild(“HallowenDONE”)’

local character = script.Parent.Parent
local player = game.Players:GetPlayerFromCharacter(character)
local triple = game.Workspace:WaitForChild("HallowenDONE")
while wait() do
	triple.Touched:Connect(function(player)
		wait(0.0000000000000000000001)
		local player = game.Players:GetPlayerFromCharacter(character)
		local playergui = player.PlayerGui

		playergui["EventQuest/s"].ImageLabelquest["1 Step Quest"]["dropper done"].Visible = false
		playergui["EventQuest/s"].ImageLabelquest["1 Step Quest"]["dropper doneV"].Visible = true
	end)
end

inside StarterCharacterScripts

is Halloween done in the workspace and if so what type of object is it?

Its in workspace and its part,

if it’s in the workspace and you already know it exists(im assuming this is a server script) why not just do game.Workspace.HalloweenDONE?

I tried it already its not work

double check you didn’t make a typo because the spelling in the title and the spelling in the script is different

ok whatever here I tried again like that

local character = script.Parent.Parent
local player = game.Players:GetPlayerFromCharacter(character)
local triple = game.Workspace.HallowenDONE
while wait() do
	triple.Touched:Connect(function(player)
		wait(0.0000000000000000000001)
		local player = game.Players:GetPlayerFromCharacter(character)
		local playergui = player.PlayerGui

		playergui["EventQuest/s"].ImageLabelquest["1 Step Quest"]["dropper done"].Visible = false
		playergui["EventQuest/s"].ImageLabelquest["1 Step Quest"]["dropper doneV"].Visible = true
	end)
end

and now HallowenDONE is not a valid member of Workspace “Workspace”

is it spelled with one “e” in the workspace too?

the only reason that would not work is if the partname you put doesn’t exist

I copy pasted the name and made it auto correct

image

is the part being deleted before the script loads?
if not I don’t know what could be wrong

nope its not, its just stay at place

in the script the o in done is a 0, that could be it?

no, just nvm I will try to find way to do something ealse

atleast maybe you know how to fix it?

Infinite yield possible on ‘Players:WaitForChild(“ShrunkenHeadsHat”)’
ShrunkenHeadsHat = not part just avatar

its child of normal part at workspace

1: use game.Players:GetPlayerFromCharacter()
2: one of your accessories is touching the part, say like “local Character = hit.Parent
local Player = game.Players:GetPlayerFromCharacter(Character)
if Player then
—idk
end

Like that?

local db = true
script.Parent.Touched:Connect(function(hit)
	game.Players:GetPlayerFromCharacter()
	local Character = hit.Parent
	game.Players:GetPlayerFromCharacter(Character)
	if db == true then
	--	local Current = game.Players:WaitForChild(hit.Parent.Name).leaderstats.Level.Current
		local Wins = game.Players:WaitForChild(hit.Parent.Name).leaderstats.Wins
		--Current.Value = Current.Value + 1
		Wins.Value = Wins.Value + 1
		db = false
		wait(1)
		db = true
	end
end)
local db = true
script.Parent.Touched:Connect(function(hit)
local Player = game:GetService(“Players”):GetPlayerFromCharacter(hit.Parent)
if Player and db == true then
Player.leaderstats.Wins.Value += 1
db = false
wait(1)
db = true
end
end)
2 Likes

Well I think its work alright.

1 Like