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

Why can't ROBLOX seem to detect this part?

Asked by 6 years ago
local player = game.Players.LocalPlayer
local char = player.Character
local img = char.Arm.RImage.RankGui.RankImage
local group = player:GetRankInGroup(2971993)

if group == 8 then
    img = "http://www.roblox.com/asset/?id=1312036764"
end

Everything works fine in Studio, however, when testing in-game I'm given this error: http://prntscr.com/jaf5sm

And here's a screenshot of the Workspace, if it helps: http://prntscr.com/jaf65z

1 answer

Log in to vote
1
Answered by 6 years ago
local player = game.Players.LocalPlayer
local char = player.Character
local img = char.Arm:WaitForChild("RImage"):WaitForChild("RankGui"):WaitForChild("RankImage")
local group = player:GetRankInGroup(2971993)

if group == 8 then
    img.Image = "http://www.roblox.com/asset/?id=1312036764"
end


0
Massively helped. Cheers. BritishActuaI 44 — 6y
Ad

Answer this question