https://medal.tv/games/roblox-studio/clips/kP3Ndn0RZDwrpGKTb?invite=cr-MSxlbWosMzY4MjMzNTcz&v=21
There's two things that are communicating, a local script in a gui and a server script in a part with a proximity promt in it. The local script is ment to wait for the remote event to fire before sending the message in the text label at the bottom of the screen, in the clip the first thing the box says is "I am very thirsty" this is ment to happen, however right after that message the box then says "I need a glass" which it's only ment to say once the remote event has been fired using the proximity promt on the tap in the bathroom.
Local Script -
person = script.Parent.Frame.Person
TapEvent = game.ReplicatedStorage.TapEvent
main = function(dialog,time,name)
print(dialog,time,name)
script.Parent.Enabled = true
dialogbox.Text = dialog
person.Text = name
wait(time)
script.Parent.Enabled = false
end
main("I am very thristy",3,"You")
TapEvent.OnClientEvent:Connect(main("I need a glass", 2, "You"))```
Server Script -
```TapEvent = game.ReplicatedStorage.TapEvent
script.Parent.ProximityPrompt.Triggered:Connect(function()
print("Event about to fire")
TapEvent:FireAllClients()
print("Event fired")
end)```
Watch Untitled by maowthecat and millions of other Roblox Studio videos on Medal. Tags: #robloxstudio
** You are now Level 5! **