#I need help with booleans
139 messages · Page 1 of 1 (latest)
mkae sure u used good server side or client side
I dod
Did
It all works great but for some reason
When I first go in it
It's alr
But then
When I go second time
It bugs and the value given is 2
For some reason
If u wanna help look at the vid so yk what I am saying
suggest u make a table for players and just add player or remove that should be maybe better
like
local playerlist = {}
part.touched:Connect(function(hit)
if hit.parent:GetPlayerFromCharacter() then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
table.insert(playerlist,plr)
end
end)
and for numbers of players in lobby u can do #playerlist
what in the world is "good server side"
why is it good
are there evil server side scripts
i mean is he used server side and local side in good way
yeah using something in a good way is probably what you want
yes
guess i gotta watch out for those then
problem is, :GetPlayerFromCharacter() isnt a method of model
its game.Players:GetPlayerFromCharacter(hit.Parent)
ur good
lemme just fix this cuz theres some minor mistakes thatll break the script
like
local playerList = {}
part.Touched:Connect(function(hit) -- .touched wont work, use .Touched
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then -- its less taxing to get player once rather than twice unecessarily
table.insert(playerList, player)
end
end)
Well yea
But the problem with table is
That I can't like get to the table from other script
So I used attributes
oh but you can
theres multiple ways to do it
wait is the script you wanna get the table from a server script too?
Btw i tryna make the queue system
It's script in workspace
that entire script seems like a mistake
then why dont you do all that in one script?
that way you already have the table
Bc of the exit btn
I need to get to the table from local script
you said it was a server script in workspace
but ok i get you
thats not how you get attributes
Amm well
what
whats your first language
nothing i just wanted to know if it was spanish so i could communicate more clearly
okay so
Oh
basically you cant access attributes the same way as properties
Wanna go in dms?
part.Value accesses a property named Value
part:GetAttribute("Value") accesses an attribute named Value
no
Value is an attribute right????
Isnt it property?
Idk i searched smt up abt attribute
your script is a mess and i dont even know what its trying to do
but why if statement
Well what was i supposed to do
loop
Root.CFrame = spawnport.CFrame + Vector3.new(0, 5, 0)
UI.Visible = false
for i = 1, 3 do
Players.Value = i - 1
game.ReplicatedStorage["plr"..i].Value = false
end
HOLLY
this
o
but i see a problem
youre trying to change a replicated value from a local script?
Yep
That isnt the problem tho
that works
but
the problem is the server script
that when u touch the part
it gives 1 and u cant get more then 3 so
yea
it doesnt
It does look at the vid i send
the server doesnt receive that change
the explorer youre seeing is the client explorer
its not what the server sees
I mean ik whats server and client but i didnt read enviroments
while skibidi do hawk the tuah end
same thing different words