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

Help with my tycoon script? [SOLVED] [closed]

Asked by 9 years ago

I was trying to get a working tycoon door script when my script stopped working! Can someone help me detect the problem?

local Owner = script.Parent.Parent.Parent.Parent.OwnerName
local Debounce = false

function GetOwner(player)
if Debounce == false then
Debounce = true
local Human = player.Parent:FindFirstChild("Humanoid")
if Human ~= nil then
local User = game.Players:GetPlayerFromCharacter(player.Parent)
if User ~= nil then
local Tycoon = Character:FindFirstChild("Tycoon")
if Tycoon ~= nil and Tycoon.Value == false then
if Owner.Value == "" then
Tycoon.Value = true
Owner.Value = Character.Name
wait(2.5)
script.Parent.Parent:remove()
Debounce = false
end
end
end
end
end
end

script.Parent.Touched:connect(GetOwner)

0
My idea is to have a brick that when touched, it will change the user's Tycoon value to true, and also change the Owner value to the user's name TheArmoredReaper 173 — 9y

Locked by Articulating

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 9 years ago

I solved this question myself xD

Ad