Script help - detection

is it a Vehicleseat OR Seat as usual?

2 Likes

make sure to check what type of seat it is.

2 Likes

seat as usuall ------------------

2 Likes

Did you get an error, the script does work.

2 Likes

Youā€™re setting the seat variable to the scriptā€™s path
Change it to script.Parent

1 Like

what do you mean --------------------------------------------------

1 Like

is script.Parent.premseatscript the script?

1 Like

premseatscript is the seat ------

1 Like

any errors showing in the output?

1 Like

ye occupant isnt a valid property

1 Like

here try this
i already tried this.

local YourSeat = script.Parent
local ShirtID = 1 -- Change To Your Shirt ID
local GroupID = 1 -- Change To Your Group ID
YourSeat:GetPropertyChangedSignal("Occupant"):Connect(function()
if YourSeat.Occupant ~= nil then
local hum = YourSeat.Occupant
local plr = game.Players:GetPlayerFromCharacter(hum.Parent)
if plr then
if plr:GetRankInGroup(GroupID) < 2 then
wait(0.5)
YourSeat.Disabled = true
YourSeat.Disabled = false
game:GetService("MarketplaceService"):PromptPurchase(plr,ShirtID)
end
end
end
end)
1 Like

your script has an error its supposed to be ā€œMarketplaceServiceā€ not ā€œMarketPlaceServiceā€

1 Like

local YourSeat = script.Parent.premseat

my seat isnt a script

1 Like

yeah change it to your Seatā€™s Path and you should be good to go.

local YourSeat = script.Parent.premseat
1 Like

all of this in error now

local GroupID = 15554654,-- Change To Your Group ID
YourSeat:GetPropertyChangedSignal(ā€œOccupantā€):Connect(function()
if YourSeat.Occupant ~= nil then
local hum = YourSeat.Occupant
local plr = game.Players:GetPlayerFromCharacter(hum.Parent)
if plr then
if plr:GetRankInGroup(GroupID) < 2 then
wait(0.5)
YourSeat.Disabled = true
YourSeat.Disabled = false
game:GetService(ā€œMarketplaceServiceā€):PromptPurchase(plr,ShirtID)
end
end)

1 Like

oops i forgot to put some ends try again, i edited the script.

1 Like
local YourSeat = script.Parent.premseat
local ShirtID = 1 -- Change To Your Shirt ID
local GroupID = 1 -- Change To Your Group ID
YourSeat:GetPropertyChangedSignal("Occupant"):Connect(function()
if YourSeat.Occupant ~= nil then
local hum = YourSeat.Occupant
local plr = game.Players:GetPlayerFromCharacter(hum.Parent)
if plr then
if plr:GetRankInGroup(GroupID) < 2 then
wait(0.5)
YourSeat.Disabled = true
YourSeat.Disabled = false
game:GetService("MarketplaceService"):PromptPurchase(plr,ShirtID)
end
end
end
end)
1 Like

image

1 Like

can you show me your explorer?

image