SO as the title suggests, my script is looking for a player that has a nil value as their name…
I don’t know how or why it’s doing it.
local playername = script.Value.Value
local DragDetector = script.Parent.DragDetector
DragDetector.DragStart:Connect(function(plr)
script.Value.Value = plr.Name
local box = DragDetector.Parent
if script.Value.Value == plr.Name then
local player = game:GetService("Players"):WaitForChild(playername)
local pay = player:WaitForChild("PayAmount")
print(pay.Parent.Name)
box:GetPropertyChangedSignal("Parent"):Connect(function()
if box.Parent == game.Workspace.ReadyToDestroy then
pay.Value = pay.Value + 1
box:Destroy()
end
end)
end
end)
according to my script it should be looking for a player with the name held by the value
and according to the warning i get
22:46:26.629 Infinite yield possible on 'Players:WaitForChild("")' - Studio
22:46:26.629 Stack Begin - Studio
22:46:26.629 Script 'Workspace.Boxes.Box.Script', Line 13 - Studio - Script:13
I don’t know why it thinks the value is an empty name as during playtest after grabbing the box, the value is set to my username…
same goes for serverside too, the value is my username
i need help
I can provide a .rbxl if needed
(my mom can’t pick me up even though im scared, please help me /j)