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

The part still isn't CanCollide false? UPDATED!

Asked by 7 years ago
Edited 7 years ago
 local platform = Instance.new("Part")
platform.Parent = game.Workspace.CurrentCamera
platform.CFrame = CFrame.new(12.5, 1.71, 17.43)
platform.Anchored = true
platform.Transparency = .5
platform.Size = Vector3.new(5, 10, 1)
local Players = game:GetService("Players")

function onPlayerAdded(player)
    game.StarterGui.LocalScript:Clone().Parent = player
    if  (player:GetRankInGroup(2551575) >= 239) then    
        platform.CanCollide = false
    end
    end

I updated my code, as of 11:26 PM EST, I did what you said (I think) and it still does not work.

1 answer

Log in to vote
1
Answered by
P100D 590 Moderation Voter
7 years ago

:IsInGroup() and :GetRankInGroup take integers, not strings. Get rid of the double quotes on the group ID and it should work.

Some other tips to improve your script:

  • :clone() is deprecated in favor of :Clone()

  • :GetRankInGroup() returns 0 for a non-member, so the :IsInGroup() call isn't required.

  • Your print() call is concatenating an empty string with player.Name. The "".. part can be removed.

  • Items in StarterGui are cloned to the player's PlayerGui automatically. Try moving the cloned script to ReplicatedStorage or ServerStorage instead.

0
Though GetRankInGroup takes integers, GetRoleInGroup gets strings. DeveloperSolo 370 — 7y
0
Still Doesn't work iSidersz 70 — 7y
Ad

Answer this question