I am making a nuke developer product, When a player purchases it, a event fires to all clients to say the name of the player and a warning message with the name of player, But apparently it gives out the own client’s name not the buyer. How do i fix this?
Here is the Server Script:
local function FiringAll()
CS:FireAllClients(28)
AT:FireAllClients(Player)
BM:FireAllClients(Player)
RR:FireAllClients()
BGAB:FireAllClients()
wait(16)
ROF:FireAllClients()
wait(7)
L:FireAllClients()
wait(5)
Explosion:FireAllClients()
--Not full code
Local Script:
AT.OnClientEvent:Connect(function()
local Purchaser = Player.PlayerGui.Nuke.Purchaser
AnimatedTextOfPurchase(Purchaser, Player.Name.." Has purchased nuke! ")
end)
--Other message
local function BoughtMessage()
game.StarterGui:SetCore("ChatMakeSystemMessage",
{
Text = "[Server]:"..Player.Name.." Has bought nuke!",
Size = 20,
Color = Color3.new(1, 0.333333, 0),
Font = Enum.Font.Creepster
}
)
end
It’s connected to the server script
The player is the localplayer
I don’t quite understand what you mean by 2 letter remotes mean
I am passing the 2 messages when a player buys the nuke
Alright will put it there
the 2 letter remotes are shortcuts instead of writing them all
here is what they mean
local RR = RS.RisingRocket
local ROF = RS.RotationOfNuke
local BM = RS.BoughtMessage
local L = RS.Landing
local AT = RS.AnimatedText
local CS = RS.CameraShake
local BGAB = RS.Buttongoneandback
I will make sure to add the connect(), thx for that tip