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

Absolutely Nothing? (FE events)

Asked by
Donut792 216 Moderation Voter
5 years ago
Edited 5 years ago
    --script
    script.Parent.Touched:Connect(function(hit)
    game.ReplicatedStorage.Battery:FireClient(hit.Parent.Name)
    end)


    --localscript
    game.ReplicatedStorage.Battery.OnClientEvent:Connect(function(hit)
        hit.Backpack.Battery.Value = true
        print(hit.Name.."Has Picked Up Battery")
    end)

nothing, nothing at all doesnt print or change the value

0
You need a client for the server to fire to. The server can't fire a RemoteEvent to a string. User#19524 175 — 5y
0
oh sorry i forgot to copy my updated code that is my old my new has :FireClient(game.Players:GetPlayerFromCharacter(hit)) on line 3 Donut792 216 — 5y
0
hit.Parent is what you should do. User#19524 175 — 5y

Answer this question