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

Fire client attempt to index local 'Player' (a nil value)?

Asked by 5 years ago
Edited 5 years ago

Fire client attempt to index local 'Player' (a nil value)

Can you help me?

Main Script - Server Script Service

001local ReplicatedStorage = game:GetService("ReplicatedStorage")
002 
003local PlrCamera = game.Workspace.CurrentCamera
004 
005local ServerStorage = game:GetService("ServerStorage")
006 
007local Status = ReplicatedStorage.Status
008 
009local Player = game:GetService("Players").LocalPlayer
010 
011local MapsFolder = game.ServerStorage.Maps
012 
013while true do
014 
015    wait(1)
View all 139 lines...

Local Script - Starter Gui

01local Event = game.ReplicatedStorage.CameraKillerBox
02local Event2 = game.ReplicatedStorage.CameraKillerBoxBack
03 
04Event.OnClientEvent:Connect(function()
05    local KillerCamera = game.Workspace.CurrentCamera
06    local Player = game.Players.LocalPlayer
07 
08    repeat wait() until Player.Character
09 
10    KillerCamera.CameraType = "Scriptable"
11    KillerCamera.CFrame = game.Workspace.VeryDarkBox.KillerBoxCameraSurvivors.CFrame
12end)
13 
14Event2.OnClientEvent:Connect(function()
15    local KillerCamera = game.Workspace.CurrentCamera
View all 21 lines...

Fire event doesn't work and please help me with Camera script (Local script) if it have any problems

0
psa: here is how to format your code on the site: https://gfycat.com/wanglamorousgermanspitz royaltoe 5144 — 5y
1
Also, is that your whole main script? In that context player doesn't exist royaltoe 5144 — 5y
0
Show us your whole Main Script and Local Script, otherwise it'll be difficult to tell what needs to be done. killerbrenden 1537 — 5y
0
I will show whole Main script tommorow because its currently almost midnight do i can't rights now kujekmarek 24 — 5y
0
Done you can check now kujekmarek 24 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

From what I see, you haven't assigned the 'Player' variable

Ad
Log in to vote
0
Answered by 5 years ago

You have attempted to index a local player from the servers side this can not be done

Answer this question