So I created a remote event script so when I touch a brick it prints hello. I just used print to try and figure out what I'm doing wrong.
Here is my script:
-- Variables --
houseprice = 250
local event = game.ReplicatedStorage:WaitForChild("PurchaseGUIEvent")
-- Script --
script.Parent.Touched:Connect(function(hit)
if hit:FindFirstChild("leaderstats") then
if hit.leaderstats.Cash.Value >= houseprice then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
event:FireClient(player)
end
end
end)
Here's what is in my local script:
local replicatedStorage = game:GetService("ReplicatedStorage")
local Gui = script.Parent
replicatedStorage.PurchaseGUIEvent.OnClientEvent:Connect(function()
print("Hey there")
end)
Whenever I touch the brick it doesn't do anything. No errors.

1 comment
Thanks! It worked. Now I can continue working on my housing code. :D