#Hello I'm new to script and I need help with this simple script (not simple for me ._.).
1 messages · Page 1 of 1 (latest)
local Platform = script.Parent
local Status = 0
local plrs = {}
Platform.Touched:Connect(function(plr)
local plr = plr.Parent
local hum = plr.Parent:FindFirstChild("Humanoid")
Status = Status + 1
print(Status)
for i, v in pairs(plrs) do
table.insert(plrs, plr)
end
end)
while true do
repeat wait() until Status == 2
print("Enough players!")
end
help :/
what is this supposed to do
local Platform = script.Parent
local Status = 0
local plrs = {}
Platform.Touched:Connect(function(plr)
local plr = plr.Parent
local hum = plr.Parent:FindFirstChild("Humanoid")
Status = Status + 1
print(Status)
for i, v in pairs(plrs) do
table.insert(plrs, plr)
end
end)
while true do
repeat wait() until Status == 2
print("Enough players!")
end
Im trying to make a platform print something once two players are stepping it at the same time
i havent really done that but
hmm
in
Platform.Touched:Connect(function(plr)
local plr = plr.Parent
local hum = plr.Parent:FindFirstChild("Humanoid")
Status = Status + 1
print(Status)
for i, v in pairs(plrs) do
table.insert(plrs, plr)
end
end)
it seems like you never checked if it was actually a player
or a humanoid
i see
hum was never used
so if its touched, Status would stil lget added
*still
also
Use Status += 1
I'm very new sorry for my lack of scripting knowledge btw
ehh its alright
atleast ur not the others
😭
