|
| 22 Oct 2015 09:42 AM |
Does player1(aka test solo dummy) have the passes you have on the account your logged in with?
- No signature - |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Oct 2015 09:45 AM |
local prt = script.Parent local passId = 294561701
game.Players.PlayerAdded:connect(function(plr) function passRecog() local hasPass = game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, passId) if hasPass then return true end end end)
prt.Touched:connect(function(hit) if passRecog then print('Plr has pass') else local tor = hit.Parent.Parent:FindFirstChild("Torso") tor.CFrame = CFrame.new(tor.Position + Vector3.new(13, 0, 0)) print('Aww, player doesnt have pass') end end)
Does that mean this script is failing me? Cause i get let through, but since i have been having trouble with this I'm kind of skeptical hence why i asked.
- No signature - |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Oct 2015 10:25 AM |
| Yes he does. If you're playing solo then yes, else no. |
|
|
| Report Abuse |
|
|
AgentL3r
|
  |
| Joined: 14 Jan 2013 |
| Total Posts: 1671 |
|
|
| 22 Oct 2015 10:26 AM |
No.
#code for i,v in pairs dont |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Oct 2015 10:34 AM |
| If player1 has the same userId as you then YES IT DOES. This is usually the case when testing in SOLO mode.. |
|
|
| Report Abuse |
|
|
AgentL3r
|
  |
| Joined: 14 Jan 2013 |
| Total Posts: 1671 |
|
|
| 22 Oct 2015 10:36 AM |
^ Actually, you're wrong.
When you play solo, it usually puts you as "Player" and transfers all your data, and makes you the owner of the game, which is why the orange ribbon is there.
When you recover an auto-save file, it puts you as Player1 when you play solo, ROBLOX needs to fix this (it does not transfer data)
#code for i,v in pairs dont |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 22 Oct 2015 10:37 AM |
| You're stupid. Of course Morash is right |
|
|
| Report Abuse |
|
|
AgentL3r
|
  |
| Joined: 14 Jan 2013 |
| Total Posts: 1671 |
|
|
| 22 Oct 2015 10:38 AM |
^
It's usually the case for me that Player1 doesn't work. I'll go test it out.
#code for i,v in pairs dont |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2015 10:42 AM |
Even my code agree's with them(Even though it might be faulty)
- No signature - |
|
|
| Report Abuse |
|
|
AgentL3r
|
  |
| Joined: 14 Jan 2013 |
| Total Posts: 1671 |
|
|
| 22 Oct 2015 10:43 AM |
^ I'm testing it out by crashing my studio, forcing an auto save
#code for i,v in pairs dont |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 22 Oct 2015 10:43 AM |
| I'm not saying you're wrong; you're not, much. I'm saying you're not right. |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2015 10:45 AM |
Would my code push back those without the pass, and let the ones with the pass in?
- No signature - |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 22 Oct 2015 10:46 AM |
| Nope. It'll let everyone through because you're not calling your function. |
|
|
| Report Abuse |
|
|
AgentL3r
|
  |
| Joined: 14 Jan 2013 |
| Total Posts: 1671 |
|
|
| 22 Oct 2015 10:46 AM |
I've completed my test.
I used a simple "GetRankInGroup" script to detect if the PlayerSolo dummy was in a group I'm in.
First, I made a script to detect the group.
Results: prntscr[DOT]com/8u3f3r
After that, I forced a crash on studio with a while true do. I re-opened the auto save and it turns out the data has not been transferred when the player is "Player1"
Result: prntscr[DOT]com/8u3fzf
#code for i,v in pairs dont |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2015 10:47 AM |
| @Agent, your point? If the player looks like you THEN OF COURSE ITS YOU!!! |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2015 10:48 AM |
Would i like do this:
local CheckPass = recogPass -- And call that instead?
- No signature - |
|
|
| Report Abuse |
|
|
AgentL3r
|
  |
| Joined: 14 Jan 2013 |
| Total Posts: 1671 |
|
|
| 22 Oct 2015 10:48 AM |
I'm just saying, when your PlaySolo dummy's name is "Player1", there's a chance that your actual player's data, such as items or groups, may not be transferred.
#code for i,v in pairs dont |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2015 10:52 AM |
How would i make it so my script does what i implied?
- No signature - |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 22 Oct 2015 10:56 AM |
| The thing is that if it is loaded from a save then Studio is not going to set the UserId of the test Player because the Game wasn't loaded by a Player. |
|
|
| Report Abuse |
|
|
AgentL3r
|
  |
| Joined: 14 Jan 2013 |
| Total Posts: 1671 |
|
|
| 22 Oct 2015 10:57 AM |
^ Oh
#code for i,v in pairs dont |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2015 10:58 AM |
So i should like test my game by joining it, will my script work then?
- No signature - |
|
|
| Report Abuse |
|
|
AgentL3r
|
  |
| Joined: 14 Jan 2013 |
| Total Posts: 1671 |
|
|
| 22 Oct 2015 10:58 AM |
I thought OP was talking about Player1 (autosave) not Player (normal)
#code for i,v in pairs dont |
|
|
| Report Abuse |
|
|