Im making a chat system when the player touched the end part, it ussually get the name of the accesory and not the parent of it, how can i fix this?
the script in the end part
script.Parent.Touched:Connect(function(plr)
game.ReplicatedStorage.ReachedEnd:FireAllClients(plr.Parent.Name)
end)
the script that makes the chats
game.ReplicatedStorage.ReachedEnd.OnClientEvent:Connect(function(plrName)
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = plrName .. " Reached the end",
Color = Color3.fromRGB(255, 255, 255),
Font = Enum.Font.Cartoon,
TextSize = 18,
})
end)
