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

Players cannot use my gamepasses when the tools goes into their inventory?

Asked by 4 years ago

There's a problem with my game passes, when I use my script that gets the game passes from replicated, the gamepasses reach the players inventory but the play is unable to use the tool. When they select it they are sent to the position where the item was first placed. Heres my gamepass giver script help me please

local player = game.Players.LocalPlayer
local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,9027783)

if ownsGamepass then
 local sword = game:GetService("ReplicatedStorage"):WaitForChild("Flintlock"):Clone()
 sword.Parent = player.Backpack
end

local player = game.Players.LocalPlayer
local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,8981498)

if ownsGamepass then
 local sword = game:GetService("ReplicatedStorage"):WaitForChild("Rifle"):Clone()
 sword.Parent = player.Backpack
end
0
Are you trying to say the player gets stuck in a certain position when they equip the tool? If so, then the problem is the tool being anchored. Ashton011 30 — 4y
0
If i unanchor the tool, the only part that appears in the players hand when they equip the tool is the handle. Nap0leonB0naparte 0 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

This is a common problem that occurs when a player is given a tool through a LocalScript. In order for the tool to work: You have to give the tool through a normal script. Best way to do that is to use RemoteFunctions to translate functions from LocalScripts to Scripts from ServerScriptService

Ad

Answer this question