local debounce = true
game.Workspace.PartToTouch.Touched:Connect(function(hit)
if game.Players.GetPlayerFromCharacter(hit.Parent) and debounce then
script.Parent.Frame.Visible = true
debounce = false
end
end)
Here is the complete code without RemoteEvents if you are interested.
local Part = "Path to part"
local Gui = "Path to gui"
local Bool = "Path to boolValue"
Part.Touched:Connect(function(_Hit)
if _Hit.Parent then
if not Bool then
Bool = true
GUI.Visible = true
end
end
end)
local Frame = script.Parent.Frame
local debounce = true
local function typeWriting(typeWriteFrame)
-- Do the typewriting stuff, if you need more help on that im always online!
end
game.Workspace.PartToTouch.Touched:Connect(function(hit)
if game.Players.GetPlayerFromCharacter(hit.Parent) and debounce then
Frame.Visible = true
typeWriting(Frame)
debounce = false
end
end)
Thatās the end script Kinda
im using the typeWriting(typeWriteFrame)
so anywhere in the function you can just say frame.Text or something like that
Haha okay, so Find your frame that you want to activate when a player stands on it, put a local script in the Frame and write this inside it:
local Frame = script.Parent
local debounce = true
local function typeWriting(typeWriteFrame)
-- Do the typewriting stuff, if you need more help on that im always online!
end
game.Workspace.PartToTouch.Touched:Connect(function(hit)
if game.Players.GetPlayerFromCharacter(hit.Parent) and debounce then
Frame.Visible = true
typeWriting(Frame)
debounce = false
end
end)
Btw i edited:
local Frame = script.Parent.Frame
to
local Frame = script.Parent
Yeah thatās correct, but make sure to put any textLabel inside the frame so it works like
local function typeWriting(typeWriteFrame)
-- Do the typewriting stuff, if you need more help on that im always online!
typeWriteFrame.TextLabel.Text -- That's an example
end