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

How to edit player when clicked? [closed]

Asked by 4 years ago

Im talking about click detector problem. The problem is that i want to make a button that teleports you. BTW i have a teleport script so im asking only for a way to make click detector that edits player. (I think that it can be the same as gui local player) Pls write in comments :p)

Closed as Not Constructive by youtubemasterWOW and JesseSong

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
oilkas 364 Moderation Voter
4 years ago

To teleport a player using a ClickDetector, you can do this:

local ClickDetector = script.Parent:WaitForChild("ClickDetector")

ClickDetector.MouseClick:Connect(function(Player)
    local Character = Player.Character
    if Character then
        -- Teleport player
    end
end)
Ad