Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how to make a part that shows who touches it?Pls Help

I tried alot and idk why my script isnt working, im trying to make a script that every 145 seconds shows who touches it and type on the screen:The Winners are .... .... .... .... ...; here is my localscript from the gui:

local player = game:GetService("Players").LocalPlayer local touch = workspace.TouchBlock local Touch = workspace.TouchBlocks Touch.Touched:Connect(function(hit) wait(145) if true then do touch.Touched:Connect(function(hit) if hit.Parent == player.Character then

	script.Parent.Text = "The Winners:".. game.Players.LocalPlayers.Name .."."
end
end)
		end

end end)

and here it is another localscript from the Starter gui:

local player = game:GetService("Players").LocalPlayer local touch = workspace.TouchBlock

touch.Touched:Connect(function(hit) wait(145) if hit.Parent == player.Character then script.Parent.Ontouchwork.TextLabel.Visible = true wait(5) script.Parent.Ontouchwork.TextLabel.Visible = false end end)

pls, if u can, help me

1 comment

0

Do you forget to parent the screen GUI and change the " Character" to " Name"?

1 answer

local player = game:GetService("Players").LocalPlayer local touch = workspace.TouchBlock touch.Touched:Connect(function(hit) wait(145) if hit.Parent == player.Name then script.Parent.Ontouchwork.Parent = player:FindFirstChild(hit.Parent).StarterGui script.Parent.Ontouchwork.TextLabel.Visible = true wait(5) script.Parent.Ontouchwork.TextLabel.Visible = false end end)

2 comments

0

its not working , idk i tried it

0

Idk wht is the problem :( its doesnt show players name on the screen

This discussion is preserved as it was. New answers, comments, and votes are closed.