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.
COMMUNITY QUESTION
my gamepass script will not work i go to the prison but dont ever get out?
1 answer
Use UserOwnsGamePassAsync and you need to Change the Service to GamepassService!
1 comment
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
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
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.
this is the local script with the real script
u got the wrong game:GetService