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

my gamepass script will not work i go to the prison but dont ever get out?

Asked by 4 years ago
Edited 4 years ago
local gamepassid = 6429682

local GamepassServis = game:GetService("GamePassService")

script.Parent.RemoteEvent.OnServerEvent:Connect(function(player,Playertoatt, playerstoattsname)

print(game.Players[playerstoattsname].Name)

Playertoatt.CFrame = game.Workspace.PrisonTp.CFrame+Vector3.new(0,1,0)

if GamepassServis:PlayerOwnsGamePassAsync(game.Players[playerstoattsname], gamepassid) then

wait(5)

Playertoatt.CFrame = game.Workspace.OutOfPrisonTp.CFrame+Vector3.new(0,1,0)

else

wait(60)

Playertoatt.CFrame = game.Workspace.OutOfPrisonTp.CFrame+Vector3.new(0,1,0)

end

end)
this also wont work.
0
local mouse = game.Players.LocalPlayer:GetMouse() script.Parent.Activated:Connect(function() if mouse.Target.Parent.Humanoid ~= nil then local mag = (game.Players.LocalPlayer.Character.HumanoidRootPart.Position-mouse.Target.Parent.HumanoidRootPart.Position).magnitude print(mag) if mag <= 5 then script.Parent.RemoteEvent:FireServer(mouse.Target.Parent.HumanoidRootPart, mouse.Target.Parent. flamingrobot1 -5 — 4y
0
this is the local script with the real script flamingrobot1 -5 — 4y
0
u got the wrong game:GetService Gameplayer365247v2 1055 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Use UserOwnsGamePassAsync and you need to Change the Service to GamepassService!

0
local gamepassid = 6429682 local GamepassServis = game:GetService("GamePassService") script.Parent.RemoteEvent.OnServerEvent:Connect(function(player,Playertoatt, playerstoattsname) print(game.Players[playerstoattsname].Name) Playertoatt.CFrame = game.Workspace.PrisonTp.CFrame+Vector3.new(0,1,0) if GamepassServis:PlayerOwnsGamePassAsync(game.Players[playerstoattsname], gamepa flamingrobot1 -5 — 4y
Ad

Answer this question