Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Players not being inserted into table? Anyone got any ideas why this isn't working?

Asked by 7 years ago

So I'm going to explain with comments in my script..

I wrote a Server Script but a part of it doesn't seem to be working

01local roundRunning = false
02local Intermission = true
03 
04local seatOne = game.Workspace.Chair1.Seat
05local seatTwo = game.Workspace.Chair2.Seat
06local seatThree = game.Workspace.Chair3.Seat
07local seatFour = game.Workspace.Chair4.Seat
08local seatFive = game.Workspace.Chair5.Seat
09local chairSix = game.Workspace.Chair6.Seat
10 
11if Intermission == true then
12    local intermissionHint = Instance.new("Hint", workspace)
13    for i = 30, 0, -1 do
14        intermissionHint.Text = "Intermission: "..i
15        wait(1)
View all 42 lines...
0
I'm not sure but I think you used the wrong thing at line 36? Sorry if this didn't do anything for you. Nep_Ryker 131 — 7y
0
Quite alright Sir! I'll go try this anyway. andyad13 74 — 7y
0
This didn't work, could be my fault though. andyad13 74 — 7y
0
Have you used manual weld or this a normal roblox-generated seat? tantec 305 — 7y
0
Roblox generated seat. andyad13 74 — 6y

1 answer

Log in to vote
1
Answered by
xAtom_ik 574 Moderation Voter
7 years ago

It is not working because on line 34, you use GetPlayerFromCharacter which takes the actual player model as the argument, not a part, so it will always return nil.

Source

0
Oh, Let me try this, Thanks! andyad13 74 — 7y
0
Hello Sir, thanks again for helping. So I changed the varriable "playerInThisSeat" to playerInThisSeat = game.Players:GetPlayerFromCharacter(seatOne.SeatWeld.Part1.Parent) But it still doesn't seem to be working :/ Have any ideas why? andyad13 74 — 7y
0
Hi! it's been a year and I've improved greatly. I see what you mean mate. Thanks andyad13 74 — 5y
Ad

Answer this question