Hello, so recently I played my game and I looked in the dev console and found this error:
How can I fix this?
Code:
local OnPad = {}
local mps = game:GetService("MarketplaceService")
local gamepasses = require(game.ReplicatedStorage.GiftGamepassReplicatedStorage:WaitForChild("GiftableGamepasses"))
local jumpId = gamepasses[2][1]
script.Parent.Touched:Connect(function(Hit)
local Character = Hit.Parent
if Character then
local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
local Humanoid = Character:FindFirstChild("Humanoid")
local ownsJumpBoost = mps:UserOwnsGamePassAsync(Player.UserId, jumpId)
if Humanoid and Player then
if not OnPad[Player] then
OnPad[Player] = true
Humanoid.JumpPower = workspace.Gravity
wait()
Humanoid.Jump = true
wait(0.5)
if ownsJumpBoost then
Humanoid.JumpPower = 78
else
Humanoid.JumpPower = 52
end
OnPad[Player] = false
end
end
end
end)