#Code not executing even with no errors

1 messages · Page 1 of 1 (latest)

severe hornet
#

I made a code that when the player touches the seat part the objective should switch but somehow no error shows and the code is also not executing. Heres the script: local Trigger = script.Parent

Trigger.Touched:Connect(function(hit)
for i,plr in pairs(game.Players:GetChildren()) do
if plr:IsA("Player") then
local plrgui = plr.PlayerGui
plrgui.Objective.TextUI.Text = "Objective: Look what happend"
end
end
end)

turbid carbon
#

And that needs to be local to run

#

So your best bet is server script and fire all clients

#

Based on what I see u trying to do

severe hornet
turbid carbon
turbid carbon
#

And see it won't print

#

So no it didn't work

severe hornet
#

can you like explian more beginner friendly?

#

im not that good of a scripter

turbid carbon
#

And you will see it won't print

#

Cuz it never worked

severe hornet
#

how do i fix it then?

#

@turbid carbon

turbid carbon
severe hornet
turbid carbon
#

And

#

Instead of the player part

#

Just fireall client thro remote

#

Touched -> fire all clients

#

And then clients do that

severe hornet
turbid carbon
#

Google remote events

severe hornet
#

nvm, it already worked with making the script style client