Infinite yield possible on

The first issue is, as this is a local script, It doesn’t have permission to see anything inside ServerStorage. To fix this, you will either have to move the object to another location or have a server script search inside ServerStorage.

btw here

well im cant move the map and the wdym script server search?

You would just have to move the folder to a place the client can see it.
Just to confirm, this is a client script?

there is no “just” i cant move the folder and its local script at StarterPlayerScripts

Did you want to explain to me what the purpose of the script is?

If you can’t move the folder, unfortunately, the only way to read something inside the folder is by using a server-side script.

it should fire event when the player touch the part

Does HalloweenDropper remain in ServerStorage, or does another script put it into the workspace?

there is map system to put one of the map in the workspace

Ah, okay, I think I understand now.
Do you think a server-sided script is able to do this instead?

Alternatively, or additionally, perhaps try

workspace:WaitForChild("HalloweenDropper").StuffAtHalloweenLobby.HalloweenDropperDone.Touched:Connect(function(hit)
-- Code

end)

Just removing local Pat should fix it.

so try it like that

local RS = game:GetService("ReplicatedStorage")
local Plrs = game:GetService("Players")

local RE = RS:WaitForChild("FirstQuest")
local Plr = Plrs.LocalPlayer
--local Pat = workspace:WaitForChild("HalloweenDropper").StuffAtHalloweenLobby.HalloweenDropperDone
	
--Pat.Touched:Connect(function(Hit)
workspace:WaitForChild("HalloweenDropper").StuffAtHalloweenLobby.HalloweenDropperDone.Touched:Connect(function(hit)
	local Target = hit.Parent
	local TouchedPlr = Plrs:GetPlayerFromCharacter(Target)

	if TouchedPlr and TouchedPlr == Plr then
		RE:FireServer() -- This will send a request from the client to the server 
	end
end)
	

Hopefully. Give it a shot and see if it works.

its gonna take little time to check iit sry oh wiat nvm


same problem

Try removing WaitForChild and just do workspace.HalloweenDropper.

2 Likes

image
prob cant remote that

Does that fire when you touch the part?

well its gonna take time to check it maybe so wait little

nop the event dont work cuz of the error

The more I read this topic the more I get confused. Let me summarize what I understand…

  • What you’re trying to do is to fire an event when the player touches a part, defined by a WaitForChild(), however it cannot find said child in the Workspace, thus the event cannot fire, returning Infinite Yield.
  • But you’re also saying that the same part is located inside a folder in ServerStorage… Would you mind showing us the script you’re using to load the map in the Workspace?
1 Like