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

How To Make Someone Teleport When They Have The Right Amount Of Coins?

Asked by 4 years ago

Im Trying To Figure This Out But Im Too Dumb To Figure It Out So Can Anyone Help Me?

2 answers

Log in to vote
0
Answered by
Gogulsky 129
4 years ago

This is the script in a part that's supposed to be the teleport you touch. The CFrame is basically the position - put a part where u want the person to be teleported, lift it up a bit so they don't get stuck in the floor and check the part's position, then put the 3 numbers in the CFrame.new()

function ontouch(hit)

    local plr = game.Players:GetPlayerFromCharacter(hit.Parent)

    if plr then

        if plr.leaderstats.Coins.Value >= 1 then

            hit.Parent.HumanoidRootPart.CFrame = CFrame.new(-365.785, 137.623, -269.178)

        end
    end
end

script.Parent.Touched:Connect(ontouch)
Ad
Log in to vote
0
Answered by 4 years ago

Hi man! Give us some more info like your Coins script and why do you want to make it happen.

Answer this question