What am I trying to achieve?
Basically when people press E and come to the stage for a match I want to show them the UI, but I have issues with it. I don’t know how to fire the remote event for two players
What did I try so far?
Searched YouTube tutorials, looked at the Developer Hub.
By the way if you’re wondering here’s the code I wrote until now:
ServerScript:
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local RemoteEvent = ReplicatedStorage:WaitForChild(“RemoteEvent”)
local GameUI = game.StarterGui.GameUI
RemoteEvent.OnServerEvent:Connect(function(player)
GameUI.Enabled = true
end)
LocalScript:
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local RemoteEvent = ReplicatedStorage:WaitForChild(“RemoteEvent”)
local Spawn1 = ReplicatedStorage.StageSpawn1
local Spawn2 = ReplicatedStorage.StageSpawn2
local User1 = ReplicatedStorage.Users.User
local User2 = ReplicatedStorage.Users.User1
local function checkSpawnPoints(player)
if Spawn1 and Spawn2 == true then
RemoteEvent:FireServer(User1, User2)
end
end
if true then
checkSpawnPoints()
end