Hey there, Heads up i'm super new to scripting
I've been trying to create a simple script for the past 1 hour and 30mins now, Trying to make it when a player touches a Part it prints there Player name along with a message in output,
I've tried all the functions and events i could find via Youtube and the wiki that seem to make sense but it doesn't seem to work
Thanks,
game.Workspace.TextChangePart.Touched:Connect(function(hit) script.Parent.Text = hit.parent.name .. " has touched the part" end)
Put inside the text label Change "TextChangePart" to your part name.
Try this:
local part = script.Parent debounce = false part.Touched:connect(function(hit) if not debounce then debounce = true if hit.Parent:findFirstChild("Humanoid") then print(hit.Parent.Name .. " has touched the brick!") end wait(.5) debounce = false end end)
Sorry if it's a little compact I wanna make it work as best as it can.