Hi guys, i have this code
local sound = Instance.new("Sound", game.Workspace)
sound.SoundId = "rbxassetid://3625290171"
local player = game:GetService("Players").LocalPlayer
local ShowMessage = player.Backpack:WaitForChild("ShowMessage")
MESSAGE_DELAY = 3.5
function dmt(hit)
if hit.Parent ~= nil then
local player = game.Players:playerFromCharacter(hit.Parent)
if player ~= nil then
if player.leaderstats.PhereStage.Value == script.Parent.Name - 1 then
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
if h.Health ~= 0 then
ShowMessage:Fire("Complimenti! Hai superato la fase " .. player.leaderstats.PhereStage.Value .. "!", true)
sound:Play()
end
end
end
end
end
end
workspace.StartPhere.1.Touched:connect(dmt)
I think the problem is at the end
workspace.StartPhere.1.Touched:connect(dmt)
I have 0 errors in console, but 1 error inside the script:
Expected '=' when parsing assignment, got '.1.Touched'
i NEED call this Model "1", i can't change it. How i can fix?
