Idk if u want to bc ur quite famous but want to collaborate on a game called grand theft beta with me and my team because I think your really experienced in this lua scripting
local prompt = game.workspace.part.proximitypart local a = false prompt.Triggered:Connect(function() if a == false then - Put code here. else - Put your code here. end hope this helps
@Studs676 --// to open and close a door. local Part = Workspace.Part local Prompt = Part.ProximityPrompt local ClosedPosition = Vector3.new(0, 0, 0) local OpenPosition = Vector3.new(0, 10, 0) Prompt.Triggered:Connect(function() if Part.Position == ClosedPosition then Part.Position = OpenPosition else Part.Position = ClosedPosition end end)
@@2da6fb14a5cf tweenservice: local part = script.parent local openpart = part.part2 -- name this whatever you want to. local closepart = part.part3 -- again, name this whatever you want to. local a = false local prompt = part.ProximityPrompt game:Getservice("Tweenservice") Prompt.Triggered:Connect(function() if a == false then game.Tweenservice:Create(part,TweenInfo.new(1),{Cframe = openpart.Cframe}):Play() else game.Tweenservice:Create(part.Tweeninfo.nee(1),{Cframe = closepart.Cframe}):Play() end end)
@@spomge2539 That means you really don't actually know what tweenservice actually is, you may know how to use it at its bare minimum, but you don't know literally anything else just from this video.
It’s a good tutorial if you know what you’re doing or prefer a hands off approach to learning. I used tween service earlier this year but forgot the operations and order, so this helped me remember.
Mine isn't working, This is the error I kept getting: "TweenService:Create no property named 'Position' for object 'FreezedownSavers.'" Im using a model to move it, is it because of that?
@@TheRobloxCoach Ok, i will let you know if I need any help. I am going to take some classes for coding and other stuff to help me understand it more but if i need help i will reach out to you. Thank you :)
@@Shadow_Reaper402u can use the roblox script editor's built in explanations (the black box above the cursor that says "TweenInfo, propertyTable") or something liek that
script for lazy as hell people. and no i wrote this script on my friggin own not copied from the video: ~~~~~~ FOR SIZE, NOT POSITION IF U WANT POSITION, JUST REPLACE THE "SIZE" IN {Size = 50,50,50} TO POSITION SO IT LOOKS LIKE THIS: {Position = 50,50,50} good luck :) ~~~~~~ local TweenService = game:GetService("TweenService") local tweenInfo = TweenInfo.new( 5, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1, true, 0 ) local desination = Vector3.new(50,50,50) local tween = TweenService:Create(script.Parent, tweenInfo, {Size = desination}) tween:Play()
Script for when player touch a block not change color: here's a simple Roblox script that creates a brick and changes its color when a player touches it: lua -- Define brick local brick = Instance.new("Part") brick.Size = Vector3.new(5, 2, 3) brick.Position = Vector3.new(0, 5, 0) brick.BrickColor = BrickColor.new("Bright green") brick.Parent = game.Workspace -- Define function to change brick color local function changeColor() brick.BrickColor = BrickColor.new("Bright red") end -- Connect function to brick's "Touch" event brick.Touched:Connect(changeColor) This script creates a new `Part` object, sets its size, position, and color, and adds it to the `Workspace`. It also defines a function `changeColor` that changes the brick's color to bright red. Finally, it connects the function to the `Touched` event of the brick, so that when a player touches the brick in the game, its color changes to red. You can modify this script to suit your needs and add more functionality to it.
local BartPart = script.Parent.Bart --Optional name local Destination = Vector3.new(-11.463, 6.446, -0.65) --Optional position local tweenInfo = TweenInfo.new(4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, false, 2) --Optional info local Tween = game:GetService("TweenService"):Create(BartPart, tweenInfo, Destination) Tween:Play()