So I got my own House buying system where u can buy houses and enter them. Now I want to do it like that players who doesnt own the house can "ring the bell". If they do that a GUI will appear to the player who owns the house.
How can I do that? I tried it with the official and tried to come around it a bit but nothing worked
-- LocalScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local messageScreen = playerGui:WaitForChild("MessageScreen")
local recipientInput = messageScreen:WaitForChild("RecipientInput")
local sendButton = messageScreen:WaitForChild("SendButton")
local messageLabel = messageScreen:WaitForChild("MessageLabel")
local sendMessageEvent = ReplicatedStorage:WaitForChild("SendMessageEvent")
local function onSendButtonClicked()
local recipientName = recipientInput.Text
local recipient = Players:FindFirstChild(recipientName)
if recipient then
sendMessageEvent:FireServer(recipient)
end
end
local function onMessageReceived(sender)
messageLabel.Text = sender.Name .. " says hello!"
messageLabel.Visible = true
wait(3)
messageLabel.Visible = false
end
sendButton.MouseButton1Click:Connect(onSendButtonClicked)
sendMessageEvent.OnClientEvent:Connect(onMessageReceived)

2 comments
If you have a server script that picks up that :FireServer() it would help to see that too
I dont.