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

Teleporter that requires a stat to go through wont work?. Please help.

Asked by 2 years ago
Edited 2 years ago

I've been trying to find the problem for this script for a while now and I cant seem to fix it. The script requires a certain amount of stats to go through and get teleported to the area but it just wont work.

Here it is:

01script.Parent.Touched:Connect(function(hit)
02    local human = hit.Parent:FindFirstChild("Humanoid")
03    if human ~= nil then
04        local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
05 
06        if plr.leaderstats.Teleport.Value >= 650 then
07            hit.Parent:MoveTo(script.Parent.Parent.Spawn1.Position)
08        end
09    end
10end)

Answer this question