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

FE Handcuffs line 11 is breaking it don't know why?

Asked by 6 years ago
01--NOT MINE
02 
03local Player = game.Players.LocalPlayer
04local Chr = Player.Character or Player.CharacterAdded:Wait()
05local Mouse = Player:GetMouse()
06local Tool = script.Parent
07local Mode
08local Torso
09local Using = false
10local PTorso
11local RemoteEvent = script.Parent.RemoteEvent --- Problem here Any Idea
12 
13if Chr:FindFirstChild'UpperTorso' then
14    PTorso = Chr.UpperTorso
15else
View all 34 lines...
0
what's the error thebayou 441 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

Try to make it wait for child, such as this

1local RemoteEvent = script.Parent:WaitForChild("RemoteEvent")
Ad
Log in to vote
0
Answered by
PolyyDev 214 Moderation Voter
6 years ago

It seems you have a RemoteEvent inside the client where the server can not access. The best place to put RemoteEvents is in ReplicatedStorage as it is shared between the server and the client. I'm assuming that code is in a LocalScript somewhere on the client where it will actually run, i.e not ReplicatedStorage or Workspace. So you need to put your event in ReplicatedStorage and change your event variable to this:

1local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent")

Accept if this helped

0
Not working saying it not clicking, Werid, AlertShamrock 37 — 6y

Answer this question