FindFirstChld is not a valid member of Model "Workspace.ScxiptedShark"

Hello Dev Forum!
Ive come across a error in my “World Boost” script.

FindFirstChld is not a valid member of Model “Workspace.ScxiptedShark”

Here Is My Script:

 local db = true
script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") ~= nil then
		if db == true then
			db = false
			local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
			Player.WorldBoost.Value = script.Parent["Boost Value"].Value
			db = true
		end
	end
end)

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChld("Humanoid") ~= nil then
		if db == true then
			db = false
			local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
			Player.WorldBoost.Value = 1
			db = true
		end
	end
end)

Also,

script.Parent["Boost Value"].Value

is underlined in red. does anyone know why?

You spelled FindFirstChild wrong

if hit.Parent:FindFirstChild("Humanoid") ~= nil then
1 Like

Oh, im a idiot. thanks! but why is script.Parent[“Boost Value”].Value underlined in red?

NVM! Its just something scripts automatically does! thanks for the help you legend! :heart: :heart:

Incase you’re still curious, it’s because the type checker thinks that script.Parent is a table and that it doesn’t have the key "Boost Value". It’s just an editor thing and doesn’t affect the game.

1 Like