I’m using remote events to make a lobby/party system, and I’ve run into an error: " Unable to assign property Text. string expected, got Instance"
The specifics on what I am trying to do: I am triggering a remote event from client-server side, and from server side - all clients, and attempting to transfer the player’s username(who fired the event) to all clients. It then comes up with the fore-mentioned error.
local debounce = true
script.Parent.MouseButton1Up:Connect(function(player)
if debounce == true then
debounce = false
script.Parent.Parent.Join.Visible = true
local username = game.Players.LocalPlayer.Name
game.ReplicatedStorage.CreateParty:FireServer(player, username)
end
end)
game.ReplicatedStorage.CreateParty.OnServerEvent:Connect(function(players, username)
game.ReplicatedStorage.CreateParty:FireAllClients(players, username)
end)
game.ReplicatedStorage.CreateParty.OnClientEvent:Connect(function(username)
print("Check")
print(username)
local cloned = script.Parent.Player:Clone()
cloned.Parent = script.Parent
cloned.TextLabel.Text = username
end)
Any solutions?