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

Locally Visible Bill/Fix bug?

Asked by 8 years ago
Edited by BlueTaslem 8 years ago

I tried for about 2 hours to make a Billboard GUI to clone and put into a block when a character touches a invisible block around the surrounding player, where the Billboard would say "Press Q to interact"...anyway you get the point. But there is 2 problems, for some reason it clones right when I join the game even without me hitting it then works fine after i touch it, it removes after I leave. And I also need it to be only visible to the player whom touched it in which it would be obviously, invisible to any other player in the server. Here is my script, help please! (Btw where you see the game.Lighting.Billy.Enabled = false that is where I tried to stop it from showing up right as I joined the game as well as the If on touch = false)

local Yaya = script.Parent
local theclone = game.Lighting.Billy:Clone()
game.Lighting.Billy.Enabled = false

if onTouch == false then
    script.Parent.Parent.BilPlace.Billy:Remove()
end

function onTouch(Yaya)
    game.Lighting.Billy.Enabled = true
    local humanoid = Yaya.Parent:FindFirstChild("Humanoid") 
    if (humanoid ~= nil) then
local theclone = game.Lighting.Billy:Clone()
game.Lighting.Billy:Clone().Parent = script.Parent.Parent.BilPlace

    end
end

script.Parent.Touched:connect(onTouch)

Yaya.TouchEnded:connect(function()

    script.Parent.Parent.BilPlace.Billy:Remove()

end)
0
Edited to add code formatting. BlueTaslem 18071 — 8y
0
Could be you are removing "Billy" instead of removing "theclone" and you don't need to define theclone multiple times, if they are meant to be multiple copies then make it different names RockerCaleb1234 282 — 8y

Answer this question