Localscript not running

Hello, I have this localscript to check when a part is touched, and to display a text on screen. But it’s not running and there are no prints in the output. It is inside of the mainGUI.

local spawnPointsCandy = workspace:WaitForChild("SpawnPointsCandy")
local spawnPointsNight = workspace:WaitForChild("SpawnPointsNight")
local spawnPointsPizza = workspace:WaitForChild("SpawnPointsPizza")

local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")


for _, part in pairs(spawnPointsCandy:GetChildren()) do
	print("hello")
	if part:IsA("Part") then
		part.Touched:Connect(function(hit)
			if hit.Parent:FindFirstChild("Humanoid") then
				local player = game.Players:GetPlayerFromCharacter(char)
				if game.Players.LocalPlayer == player then
					print("touched spawnpoint")
					script.Parent.Spawnpoint.Visible = true
					wait(3)
					script.Parent.Spawnpoint.Visible = false
				end
			end
			
		end)
	end
end

Thanks :slight_smile:

I just found out it was because streaming enabled is on.