Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago

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

0
Do you forget to parent the screen GUI and change the " Character" to " Name"? uiuiuiuihauahua67 15 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

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)

0
its not working , idk i tried it xbloodyguyx 10 — 3y
0
Idk wht is the problem :( its doesnt show players name on the screen xbloodyguyx 10 — 3y
Ad

Answer this question