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

Any guides for using filteringenabled?

Asked by
lomo0987 250 Moderation Voter
10 years ago

I have been looking through the wiki and it doesn't really explain how to code with it. I read that they need to be coded differently so they fire on the server when they are in a local script in the player... Or something like that.

Here is local script inside the player that breaks.. I have no idea how I would change it to make it work...

wait(1)
repeat wait() until game.Players.LocalPlayer
wait(1)
local player = game.Players.LocalPlayer
print("Found Player")
local character = player.Character
print("Found character")
local Hlth = player.Character.Humanoid.Health
print("Found health")
local MaxHealth = player.Character.Humanoid.MaxHealth
print("Found MaxHealth")

local bg = Instance.new("BillboardGui")
bg.Parent = player.Character.Head
bg.Adornee = player.Character.Head
bg.Size = UDim2.new(1, 0, 1, 0)
bg.StudsOffset = Vector3.new(0, 3, 0)
print("MadeGui") 

local frame = Instance.new("Frame")
frame.Parent = bg
frame.Size = UDim2.new(1, 0, 1, 10)
frame.BackgroundTransparency = 1
frame.BackgroundColor3 = Color3.new(1, 1, 1)
print("Made Frame")

local text = Instance.new("TextLabel")
text.Parent = frame
text.Position = UDim2.new(0, -65, 0, 0)
text.Size = UDim2.new(0, 150, 0, 20)
text.BackgroundTransparency = 1
text.BorderSizePixel = 0
text.TextScaled = true
text.TextWrapped = true
text.Text = Hlth.."/"..MaxHealth
print("Made Text")

player.Character.Humanoid.HealthChanged:connect(function(HTH)
    text.Text = math.floor(HTH).."/"..MaxHealth
end)
0
RemoveEvents and RemoteFunctions... Wiki Article: http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial TheStudentPilot 75 — 10y
0
Please read the first sentence I typed.... lomo0987 250 — 10y
0
That Wiki tells you exactly how to read it... the first example tells you where to put your code. RemoteEvents and RemoteFunctions are the only way for things normally blocked by FilteringEnabled to run. TheStudentPilot 75 — 10y

Answer this question