Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
|
| 23 Jun 2017 09:10 AM |
so my game has the online server leaderboard thing where you get points and it shows on the game page under leader board here is where the script comes in..
is it possable to have a Door where once the player has a # of points on the board it lets them go though the door? if so how is that script done? because i am clueless with it |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2017 09:12 AM |
wiki.roblox.com/index.php?title=Points_tutorial
and
wiki.roblox.com/index.php?title=API:Class/PointsService/GetGamePointBalance
|
|
|
| Report Abuse |
|
|
| |
|
Pro_JC
|
  |
| Joined: 08 Jul 2011 |
| Total Posts: 2701 |
|
|
| 23 Jun 2017 09:43 AM |
^ FE?
The only thing I know FE stands for is 'Flat Earther'...
Pineapples do not belong on Pizza |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2017 09:46 AM |
...
Allows a certain player to enter the door without letting others enter without the desired amount of points ( glitching ) or just use collisionfidelity |
|
|
| Report Abuse |
|
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
|
| 23 Jun 2017 10:14 AM |
well this is what i came up with
local PointsService = game:GetService("PointsService") local Door = script.Parent;
game.Players.PlayerAdded:connect(function(player) -- Get total number of points this game has already awarded to the player local universeBalance = PointsService:GetGamePointBalance(player.userId) if ( universeBalance == 10) then function open() Door.Transparency = 0.5; Door.CanCollide = false; wait(2); Door.CanCollide = true; Door.Transparency = 0; end end
and its not working any ideas? |
|
|
| Report Abuse |
|
|
RuizuKun
|
  |
| Joined: 20 Jan 2016 |
| Total Posts: 1133 |
|
|
| 23 Jun 2017 10:42 AM |
Collision Group?
This is Reality, NOT a Dream. |
|
|
| Report Abuse |
|
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
| |
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
| |
|
VilgO
|
  |
| Joined: 15 Feb 2011 |
| Total Posts: 518 |
|
|
| 23 Jun 2017 02:34 PM |
| That's just a regular VIP door, except instead of checking whether they are VIP you check whether they have enough points. |
|
|
| Report Abuse |
|
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
|
| 23 Jun 2017 02:42 PM |
@above this is what i came up with
local PointsService = game:GetService("PointsService") local Door = script.Parent;
game.Players.PlayerAdded:connect(function(player) -- Get total number of points this game has already awarded to the player local universeBalance = PointsService:GetGamePointBalance(player.userId) if ( universeBalance == 10) then function open() Door.Transparency = 0.5; Door.CanCollide = false; wait(2); Door.CanCollide = true; Door.Transparency = 0; end end
but it does not work.. |
|
|
| Report Abuse |
|
|
VilgO
|
  |
| Joined: 15 Feb 2011 |
| Total Posts: 518 |
|
|
| 23 Jun 2017 02:48 PM |
| You need to connect to Touched. Currently you only open the door once, when the player joins the game. |
|
|
| Report Abuse |
|
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
|
| 23 Jun 2017 03:37 PM |
ok so this is the new script and it still does not work i am probly doing something wrong
local PointsService = game:GetService("PointsService") local Door = script.Parent;
game.Players.PlayerAdded:connect(function(player) -- Get total number of points this game has already awarded to the player local universeBalance = PointsService:GetGamePointBalance(player.userId) function onTouched(part) if ( universeBalance == 10) then function open() Door.Transparency = 0.5; Door.CanCollide = false; wait(2); Door.CanCollide = true; Door.Transparency = 0; end end end |
|
|
| Report Abuse |
|
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
| |
|
mjgh06
|
  |
| Joined: 01 Jul 2013 |
| Total Posts: 38 |
|
|
| 23 Jun 2017 04:26 PM |
| Check out the scripts used for purchase based on points and modify it for the door. |
|
|
| Report Abuse |
|
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
|
| 23 Jun 2017 04:33 PM |
| i would but when i try looking for them in the catalog i get just random results even though it is on relevant |
|
|
| Report Abuse |
|
|
mjgh06
|
  |
| Joined: 01 Jul 2013 |
| Total Posts: 38 |
|
|
| 23 Jun 2017 04:47 PM |
| here is part of a script I did for my leaderboard purchase you can modify it as needed. local stats = player:FindFirstChild('leaderstats') if not stats then return end local points = stats:FindFirstChild('Points') if not points then return end if choice == script.Parent.DialogChoice.ChoiceA then if points.Value >= 200 then game.ReplicatedStorage.Weapon1:Clone().Parent = player.Backpack points.Value = points.Value - ### ### ## ############ < 200 then print("Not enough") end |
|
|
| Report Abuse |
|
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
|
| 23 Jun 2017 04:57 PM |
| im..not sure how to apply that to the door.. |
|
|
| Report Abuse |
|
|
mjgh06
|
  |
| Joined: 01 Jul 2013 |
| Total Posts: 38 |
|
|
| 23 Jun 2017 05:20 PM |
Use the door script verify the points if points = the right amount door open else
not going to give you the script to do but will help you learn. |
|
|
| Report Abuse |
|
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
|
| 23 Jun 2017 05:32 PM |
@above that is what i thought i did with this script
local PointsService = game:GetService("PointsService") local Door = script.Parent;
game.Players.PlayerAdded:connect(function(player) -- Get total number of points this game has already awarded to the player local universeBalance = PointsService:GetGamePointBalance(player.userId) function onTouched(part) if ( universeBalance == 10) then function open() Door.Transparency = 0.5; Door.CanCollide = false; wait(2); Door.CanCollide = true; Door.Transparency = 0; end end end
but i have no clue why its not worknig |
|
|
| Report Abuse |
|
|
mjgh06
|
  |
| Joined: 01 Jul 2013 |
| Total Posts: 38 |
|
|
| 23 Jun 2017 06:03 PM |
game.Players.PlayerAdded:connect(function(player) --this is just to connect with added players. You have to get leaderboard stats and then the point value. Names, capitalization all make a difference.
local universeBalance = PointsService:GetGamePointBalance(player.userId)
--in your leaderboard script, are the points or leaderboard named universeBalance??
|
|
|
| Report Abuse |
|
|
mjgh06
|
  |
| Joined: 01 Jul 2013 |
| Total Posts: 38 |
|
|
| 23 Jun 2017 06:10 PM |
example of mine shown:
local stats = player:FindFirstChild('leaderstats') --my leaderboard is the leaderstats
local points = stats:FindFirstChild('Points')--my leaderboard has a Points system
if points.Value >=200--it has a value for points so I want to make sure for such and such they have at least
if they don't have enough they don't get whatever. this would be same for door open or close. |
|
|
| Report Abuse |
|
|
mjgh06
|
  |
| Joined: 01 Jul 2013 |
| Total Posts: 38 |
|
|
| 23 Jun 2017 06:41 PM |
Dreaderr
I changed my door to a points door and it worked using what I posted. Did you get yours to work?
|
|
|
| Report Abuse |
|
|
Dreaderr
|
  |
| Joined: 03 Nov 2014 |
| Total Posts: 844 |
|
|
| 24 Jun 2017 08:48 AM |
| nomp..still cant get it to work |
|
|
| Report Abuse |
|
|
ReaIG
|
  |
| Joined: 10 Apr 2017 |
| Total Posts: 4021 |
|
| |
|