Im making a simple trade gui and i have some problems
my script is:
the problem is:
it’s local script.
Im making a simple trade gui and i have some problems
my script is:
the problem is:
it’s local script.
local TradeRemoteEvent = game.ReplicatedStorage.TradeSend
local Player = game.Players.LocalPlayer
local PlayerName = Player.Name
local TextBox = script.Parent:WaitForChild("Text")
if TextBox == PlayerName then
print("Working")
end
This usually happens when it can’t find what you are waiting for. Are you sure that game.Players.LocalPlayer.Name
(not the property) exists? You should elaborate on what you are trying to do. Your code is confusing.
This will work:
local TradeRemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("TradeSend")
local TextBox = script.Parent:WaitForChild("Text")
if TextBox.Text == game:GetService("Players").LocalPlayer.Name then
print("Working")
end
Yes, I am sure.But didnt work.
Yes worked.i can’t select 2 person.
@Dquvo how does @UndesirableMartim script works?
It should be like this:
(You want to compare text, so my solution would work in this case. In @UndesirableMartim’s solution you compare item with player name, so it won’t work as you want.