remova a funçao do "selected" : local Player = game.Players.LocalPlayer local…
- User
remova a funçao do "selected" : local Player = game.Players.LocalPlayer local TweenService = game:GetService("TweenService") local Marketplace = game:GetService("MarketplaceService") local Characters = game.ReplicatedStorage:WaitForChild("Characters") local TotalCharacters = 0
for i, character in pairs(Characters:GetChildren()) do TotalCharacters += 1 if TotalCharacters >= 3 then script.Parent.Characters.ScrollingEnabled = true script.Parent.Characters.ScrollBarImageTransparency = 0 end local CharacterFrame = script.CharacterFrame:Clone() CharacterFrame.CharName.Text = character.Name local clonecharacter = character:Clone() --clonecharacter.WorldPivot = CFrame.new(0, -0.8, -5.5, -0.9, 0, 0.2, 0, 1, 0, -0.2, 0, -0.9) clonecharacter.Parent = CharacterFrame local RandomColorPart = Instance.new("Part") RandomColorPart.BrickColor = BrickColor.Random() CharacterFrame.Choose.BackgroundColor3 = RandomColorPart.Color RandomColorPart:Destroy() if clonecharacter.PrimaryPart then clonecharacter:SetPrimaryPartCFrame(CFrame.new(0, -0.8, -5.5, -0.9, 0, 0.2, 0, 1, 0, -0.2, 0, -0.9)) else if clonecharacter:FindFirstChild("HumanoidRootPart") or clonecharacter:FindFirstChild("Torso") then if clonecharacter:FindFirstChild("HumanoidRootPart") then clonecharacter.HumanoidRootPart.CFrame = CFrame.new(0, -0.8, -5.5, -0.9, 0, 0.2, 0, 1, 0, -0.2, 0, -0.9) else clonecharacter.Torso.CFrame = CFrame.new(0, -0.8, -5.5, -0.9, 0, 0.2, 0, 1, 0, -0.2, 0, -0.9) end else CharacterFrame.Visible = false end end CharacterFrame.Choose.MouseButton1Click:Connect(function() if CharacterFrame.Choose.X.Text == "Selected" then script.Parent:TweenPosition(UDim2.new(0.228, 0,1, 0), "Out", "Quad", 0.2) script.Parent.Characters.CanvasPosition = Vector2.new(0, 0) return end game.ReplicatedStorage.CharacterEvent:FireServer(character.Name) script.Parent:TweenPosition(UDim2.new(0.228, 0,1, 0), "Out", "Quad", 0.2) script.Parent.Characters.CanvasPosition = Vector2.new(0, 0) for i, characterfr in pairs(script.Parent.Characters:GetChildren()) do if characterfr:IsA("ViewportFrame") then characterfr.Choose.X.Text = "Selecionar" end end CharacterFrame.Choose.X.Text = "Selected" end) CharacterFrame.Parent = script.Parent.Characters end
script.Parent.ExitButton.MouseButton1Click:Connect(function() script.Parent:TweenPosition(UDim2.new(0.228, 0,1, 0), "Out", "Quad", 0.2) script.Parent.Characters.CanvasPosition = Vector2.new(0, 0) end)
script.Parent.Parent.Character.MouseButton1Click:Connect(function() if script.Parent.Position == UDim2.new(0.228, 0,0.2, 0) then script.Parent:TweenPosition(UDim2.new(0.228, 0,1, 0), "Out", "Quad", 0.2) else script.Parent:TweenPosition(UDim2.new(0.228, 0,0.2, 0), "Out", "Quad", 0.2) end end)
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.