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

Bad Argument (Interval Is Empty)?

Asked by
Fxicity 10
4 years ago
Edited 4 years ago

The code is for a hide n seek game and there is 2 scripts so far. Im having trouble with line 16. Here is the code, please help me and thanks. And if you need the other script as well it is below this one.

Server Main

01local replicatedStorage = game:GetService("ReplicatedStorage")
02local serverStorage = game:GetService("ServerStorage")
03 
04local status = replicatedStorage.Values.Status
05 
06local playersToStart = 1
07 
08local function chooseSeeker(availablePlayers)
09    return availablePlayers[math.random(1, #availablePlayers)]
10end
11 
12local function teleportPlayers(availablePlayers,spawns)
13    for _, player in pairs(availablePlayers) do
14        if player.Character then
15            if player.Character:FindFirstChild("HumanoidRootPart") then
View all 55 lines...

Client Main

01local replicatedStorage = game:GetService("ReplicatedStorage")
02local serverStorage = game:GetService("ServerStorage")
03 
04local status = replicatedStorage.Values.Status
05 
06local timer = replicatedStorage.Values.Timer
07 
08local playersLeft = replicatedStorage.Values.PlayersLeft
09 
10local HUD = script.Parent
11local statusFrame = HUD:WaitForChild("Status")
12local playersLeftFrame = HUD:WaitForChild("PlayersLeft")
13 
14statusFrame.StatusTitle.Text = status.Value
15 
View all 28 lines...

Fxicity

1 answer

Log in to vote
0
Answered by 4 years ago

hello, try this

1player.Character.HumanoidRootPart.CFrame = spawns[Random.new():NextInteger(1, #spawns)].CFrame + Vector3.new(0,5,0) -- line 16
0
Try to explain what you changed, how to fix the problem, it will help the question author alot with understanding and solving similar problems in the future. Torren_Mr 334 — 4y
Ad

Answer this question