Hello, So i have been recently workin on a rp game “Palm Springs [RP]” so for now i have been using onTouch group door!. I’ve tried to put inside the onTouch door group script on Click i failed. I haven’t found anything on youtube. So guys if u have any solution or anything that would help please comment. Thank u guys. And excuse my grammar
If you want to make a rank (for example a Team
) then you need to do
local rank_namethere = Instance.new("Team",game.Teams)
rank_namethere.Name = "???"
rank_namethere.AutoAssignable = false
If you meant something other than team, what is it?
So by on click do you mean you have to click to open the door?
Hello. I meant u know Group Rank Door that check for ur rank and if u rank is for example sergeant u can go through anyways u cant. But im trying to do this on a click
Yeah. But u can only open it if u have group rank for example sergeant
Do you mean like only it open for some ranks on group?
Then try making a Script that uses ClickDetector
Make it check your rank and if its Sergeant
then it opens the door. Then check player’s rank once door is CanCollide = false
and if its not Sergeant
Simply set their Health to 0.
Yeah but it will kill the player wont? it
Yeah i do. but i have no idea how
It will. But it will kill the player that doesn’t have the Sergeant rank.
Do you have group?
If yes tell me the number of sergeant role number.
The number isnt important all i need is just the script
Alright, wait a moment. I will write the script.
Okay thank u i really appreciate
I’ll try too
(30charrrrrrrrrs)
local door = script.Parent.Parent
local clickDetector = script.Parent
local cooldown = false
clickDetector.MouseClick:Connect(function(plr)
if cooldown == false then
local group_id = 0000000--Group Id
local RankName = plr:GetRoleInGroup(group_id)
local roleNumber = plr:GetRankInGroup(group_id)
print(RankName)
if RankName == "Sergeant" or roleNumber == 00 then --Role number is the number of the rank
cooldown = true
door.CanCollide = false
door.Transparency = 0.5
wait(2)
door.CanCollide = true
door.Transparency = 0
cooldown = false
end
end
end)
local db = false
local team = game.Teams.Sergeant
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
if db == true then return end
db = true
if plr.TeamColor == team.TeamColor then
script.Parent.CanCollide = false
script.Parent.Transparency = .5
wait(5)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
--[[script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local chr = hit.Parent
local plr2 = game.Players:GetPlayerFromCharacter(chr)
if plr2.TeamColor ~= team.TeamColor then chr.Humanoid.Health = 0 end
end
end)]]
end
wait()
db = false
end)
there’s what i’ve got so far.
He said group rank not teams.
…
Thank u guys i will try both of them and credit u
It can also work if game has teams which are assigned as soon as player joins and if player has the group rank