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

Why cant this simple line just work that is fired by remote events???

Asked by
chafava -113
5 years ago
Edited 5 years ago
player = game:GetService("Players").LocalPlayer
game.ReplicatedStorage.Mine:FireServer(target, player)

Above fires it

Below cannot even print players name

Remote = game.ReplicatedStorage.Mine
local n = 0
local s = nil

Remote.OnServerEvent:Connect(function(playerWhoFired, player, target)
    print("Fired")
    print(player.Name)
end)

**I will not show full code to prevent copying***

Okay that is the problem, how can I fix this.

It prints nothing at 'print(player.Name)'!

1
Try to switch player and target in the second script Lazarix9 245 — 5y
0
Try adding a wait after line 5 and line 6. AwesomeMrBird -79 — 5y
0
The player is automatically passed as the first argument with FireServer ABK2017 406 — 5y

Answer this question