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

[SOLVED] Could someone help with this RemoteEvent? I cannot figure out the problem with my scripts.

Asked by 5 years ago
Edited 5 years ago

I am trying to make a remote event fire to a single client. I cannot figure out why my current scripts are not working.

--Script
game.ReplicatedStorage.One.OnServerEvent:Connect(function(plr)
    if game.Workspace[plr.Name.."'s Place on Board"].Value == 2 then
        game.Workspace[plr.Name].UpperTorso.CFrame= CFrame.new(-34.412, 2.209, 22.888)
        game.ReplicatedStorage.PurchaseBloxField:FireClient(plr)
        print("Sent request to buy it!")
    end
end)
--LocalScript
game.ReplicatedStorage:WaitForChild("One")
while true do
    game.ReplicatedStorage.One:FireServer()
    wait(3)
end

game.ReplicatedStorage.PurchaseBloxField.OnClientEvent:Connect(function()
    print("Received request to buy it!")
    script.Parent.Purchase.BloxField.Visible = true
end)

It successfully prints "Sent request to buy it!", but not "Received request to buy it!". There are no errors in the output.

0
This may be helpful. Take a careful look at your LocalScript. https://scriptinghelpers.org/blog/common-mistakes#Loops M39a9am3R 3210 — 5y
0
Thank you! Endergenius100 12 — 5y

Answer this question