Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

dialogue gui problem where text dont show, how do i fix it?

Asked by 4 years ago

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)

1 answer

Log in to vote
0
Answered by 4 years ago

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

Ad

Answer this question