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

Why wont my Gui local script work??? it dose not want to = true...

Asked by 4 years ago
Edited 4 years ago

So this is a morph gui script but im trying to make it so you can only morph with a level but it wont work... code:

local Canmorph = true

local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
local stats = player:findFirstChild("leaderstats") Leaderboard
local sp = stats:findFirstChild("Level")
if sp == nil then return false end 
if (sp.Value >=15) then
local Canmorph = true
else
local Canmorph = false  

script.Parent.MouseButton1Click:Connect(function ()
    if Canmorph = true then
    game.ReplicatedStorage.Changechar:FireServer(game.ReplicatedStorage.    BabyMeerkat)
 end)
end

Answer this question