Anyone know a simple way of making text appear in a screengui at the bottom of the player's screen, only for the player who touched the part? And when they stop touching the part, the text would disappear? Also, I don't know how to put a "click to continue" script for the dialogue. Can someone teach me how?
Use a normal script then put your GUI inside the script. Just type:
local gui = script.Gui local touched = false --whatever the part where the players want to touch-- script.Parent.Parent.Block.Touched:connect(function(p) if not touched then touched = true if p.Parent:FindFirstChild('Humanoid') then gui:Clone().Parent=game.Players[p.Parent.Name].PlayerGui wait(3) end touched=false end end) script.Parent.Parent.Block.TouchedEnded:connect(function(p) game.Players[p.Parent.Name].PlayerGui:WaitForChild('Gui'):Destroy()
Make a Local script inside of StarterPlayer -> StarterPlayerScripts. Then add a RemoteEvent to ReplicatedStorage. After that add a LocalScript inside of StarterGui. Finally, Make a part in workspace.
Local Script for StarterPlayerScripts:
local Target = game.Workspace.Brick -- Brick is the Part's Name. local PlrGui = game.Players.LocalPlayer.PlayerGui game.ReplicatedStorage.RemoteEvent:FireServer() Target.Touched:Connect(function() PlrGui.ScreenGui.Frame:TweenPosition(UDim2.new(0,0,0.899,0),"Out","Bounce",5) -- This makes the Text slide out and bounce into place. The 5 is how long the "Animation" will take. Target.TouchEnded:connect(function() PlrGui.ScreenGui.Frame:TweenPosition(UDim2.new(-1,0,0.899,0),"In","Quad",5) -- This makes the Text slide in and be out of the players way. end) end)
Then after that inside of StarterGui's Local script put
game.ReplicatedStorage.RemoteEvent.OnServerEvent:connect(function() -- Just fires the server up end)
Now, that it's all done press play, Stand on the brick, and then wait a few second and step off. Hope this works for you.