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

Tycoon script fail, need help?

Asked by 9 years ago

Output: 20:57:06.079 - Unable to create an Instance of type "StockSound"

I don't understand. Where did I go wrong? The script is where if you touch a door, you will claim that tycoon.

-- made by roboy5857

local gate = script.Parent.Parent
local door = script.Parent

local player = game.Players.LocalPlayer

function Claim()
        door.Transparency=0.5
    door.CanCollide=false
    if player.Humanoid == nil then
    wait(1)
    door.Name="Claimed"
    end
end

function onTouched(door)
    if player:onTouched(door) then
        if player.Humanoid == nil then
            Claim()         
        end
    end
end


1
That error is pretty clearly not coming from this script. BlueTaslem 18071 — 9y
0
Im a noob scripter, so maybe thats why. mikeCONronald 25 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

i think its because you do ~= nil for line 19 i think but im not entirely sure.

Ad

Answer this question