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 6 years ago
Edited 6 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.

1--Script
2game.ReplicatedStorage.One.OnServerEvent:Connect(function(plr)
3    if game.Workspace[plr.Name.."'s Place on Board"].Value == 2 then
4        game.Workspace[plr.Name].UpperTorso.CFrame= CFrame.new(-34.412, 2.209, 22.888)
5        game.ReplicatedStorage.PurchaseBloxField:FireClient(plr)
6        print("Sent request to buy it!")
7    end
8end)
01--LocalScript
02game.ReplicatedStorage:WaitForChild("One")
03while true do
04    game.ReplicatedStorage.One:FireServer()
05    wait(3)
06end
07 
08game.ReplicatedStorage.PurchaseBloxField.OnClientEvent:Connect(function()
09    print("Received request to buy it!")
10    script.Parent.Purchase.BloxField.Visible = true
11end)

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 — 6y
0
Thank you! Endergenius100 12 — 6y

Answer this question