Hey, I made a dialogue thing like from the camping games but I having a problem with it, the problem is, is where it wont show the text please help :) Code:
--Local Script local players = game.Players:GetPlayers() local player = players[math.random(1,#players)] local event = game.ReplicatedStorage.Talk local talk = script.Parent.Frame.Talk local title = script.Parent.Frame.Title event:FireServer(player,title,talk)
--Script local event = game.ReplicatedStorage.Talk event.OnServerEvent:Connect(function(player,title,talk) title.Text = player.Name..":" talk.Text = "Lets go inside the house." end)
You should not pass the player object into :FireServer
, the event OnServerEvent
already knows who fired the remoteEvent from the first parameter
https://developer.roblox.com/en-us/api-reference/function/RemoteEvent/FireServer https://developer.roblox.com/en-us/api-reference/event/RemoteEvent/OnServerEvent