I’m really confused as to why Hello1 isn’t printing at all. When the start Bool Value is set to true, module:speed(16) works and which is a function in a module script that gets players in a in pairs loop and speeds the players that are in a tribe 16. But the in pairs loop doesn’t work at all it’s not even printing Hello1 and I’m so confused.
script.Parent.start.Changed:Connect(function(x)
if x == true then
script.Parent.start.Value = false
for i, p in pairs(game.Players:GetPlayers()) do
print("Hello1")
if module:isintribe(p) == true then
print("Hello2")
module:disabletoolui(p)
end
end
module:speed(16)
end
end)
Not necessarily, if you’re just running the game instead of playing the game, there are no players, if i were you print game.Players:GetPlayers() before you do the for loop just to see what it prints to begin with!
Well that’s not the case in my situation since I’ve play tested with 3 players and all players have loaded. It’s a challenge where when the start value is set to true, the players have their toolbar disabled and their speed. The thing that’s weird is that the module:speed(16) is also a GetPlayers() which actually works but the previous one doesn’t.
i think your problem is with the script running before the players are loading in (?)
could be a studio timing issue too, often scripts run earlier/later than they would in a real game
That would be true if module:speed(16) was yielded i’m pretty sure. it just skips over the code block for some reason. also the players are 100% loaded in when the script is running
Hello, first of all, above the whole for loop, print game.Player:GetPlayers() to see if it isn’t an empty table. Secondly, are you really sure module:speed(16) is the one running? Is not any other script running the same function? To check that, add another print where you call that function. Instead of using print, use breakpoints which are simpeler to use.
ok its fixed the solution was rather embarrassing i forgot to set the walk speed to 0 when teleporting players and forgot to set the start value to start so it made it look like the module:speed(16) worked but in reality nothing did-