I made a pad, that if you touch it, a gui pops up. But it only works in studio , but not ingame. Please help!
script:
local rp = game.ReplicatedStorage local ev = rp.EnterPaintShop local cam = game.Workspace.CurrentCamera local debounce = false function something(hit) if hit.Parent:FindFirstChild("Humanoid") then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) for i,v in pairs(plr.Character:GetChildren())do if v:IsA("Model") and v.Name == plr.Name.."'s Car" then v:Destroy() end for _,k in pairs(cam:GetChildren())do k:Destroy() end if not debounce then debounce = true local plr = game.Players:GetPlayerFromCharacter(hit.Parent) local c = plr:WaitForChild("SelectedCar").Value:Clone() c.Parent = game.Workspace.CurrentCamera c:SetPrimaryPartCFrame(game.Workspace.painttp.CFrame) plr.Character.Torso.CFrame = plr.Character.Torso.CFrame + Vector3.new(3,0,3) plr.Character.Humanoid.WalkSpeed = 0 plr.PlayerGui.PaintGUI.Enabled = true cam.CameraSubject = game.Workspace.painttp debounce = false end end else return nil end end script.Parent.Touched:Connect(something)