generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: TweenPosition help

Previous Thread :: Next Thread 
Godlydeathdragon is not online. Godlydeathdragon
Joined: 08 Jun 2012
Total Posts: 50
22 Jul 2016 09:00 PM
Hey I'm scripting a GUI that tells where they are in the game like those Pokemon games that say Route 1 and stuff like that on the side of the screen but I cant get the GUI to appear when the player steps on a certain part. I don't know what to do so here's the script. Post below what I should do
Report Abuse
Godlydeathdragon is not online. Godlydeathdragon
Joined: 08 Jun 2012
Total Posts: 50
22 Jul 2016 09:01 PM
That moment when you forget to post the code lol.

--[[ Scripted by Godlydeathdragon ]]--

local guiTriggered = script.Parent
local Gui1Image = game.StarterGui.Gui1.ImageLabel

local function steppedOn(part)
local parent = part.Parent
if game.Players:GetPlayerFromCharacter(parent) then
parent.Humanoid.WalkSpeed = 50
wait(.1)
Gui1Image:TweenPosition(UDim2.new(-0.043, 0, -0.042, 0), 'Out', 'Bounce', 1)
else
Gui1Image:TweenPosition(UDim2.new(-0.743, 0, -0.042, 0), 'Out', 'Bounce', 1)
end
end

guiTriggered.Touched:connect(steppedOn)


thx
Report Abuse
Godlydeathdragon is not online. Godlydeathdragon
Joined: 08 Jun 2012
Total Posts: 50
24 Jul 2016 01:06 PM
Bump ;')
Report Abuse
Smeers is not online. Smeers
Joined: 14 Feb 2013
Total Posts: 797
24 Jul 2016 01:09 PM
Assuming this is filteringenabled (everyone should develop with it by now), find the part in the Workspace inside of a localscript, then use a debounce and trigger it onTouched.
Report Abuse
Godlydeathdragon is not online. Godlydeathdragon
Joined: 08 Jun 2012
Total Posts: 50
24 Jul 2016 01:14 PM
What do you mean by inside of a localscript
Report Abuse
darthpyro is not online. darthpyro
Joined: 18 Aug 2009
Total Posts: 3569
24 Jul 2016 01:15 PM
You're moving the Gui in the StarterGui, not in the actual PlayerGui. The StarterGui is only replicated to the client on respawn.
Report Abuse
Smeers is not online. Smeers
Joined: 14 Feb 2013
Total Posts: 797
24 Jul 2016 01:16 PM
If you don't know what localscripts are, you need to learn a bit more before you script too much or you'll basically keep using the same code via memory (instead of learning), which is never good.

I mean no disrespect in this reply.

Try the wiki.
Report Abuse
Godlydeathdragon is not online. Godlydeathdragon
Joined: 08 Jun 2012
Total Posts: 50
24 Jul 2016 01:17 PM
I know what localscripts but nevermind lol
Report Abuse
Godlydeathdragon is not online. Godlydeathdragon
Joined: 08 Jun 2012
Total Posts: 50
24 Jul 2016 02:23 PM
This is what I have currently for the script [Updated version]

--[[ Scripted by Godlydeathdragon ]]--

local guiTriggered = script.Parent
local Gui1Image = game.Players.LocalPlayer.PlayerGui:WaitForChild('Gui1').ImageLabel

debounce = false

guiTriggered.Touched:connect(function(hit)
h = hit.Parent:FindFirstChild('Humanoid')
h.WalkSpeed = 50
h.JumpPower = 50
wait(1)
if debounce == false then
debounce = true
Gui1Image:TweenPosition(UDim2.new(-0.043, 0, -0.042, 0), 'Out', 'Bounce', 1)
wait(3)
Gui1Image:TweenPosition(UDim2.new(-0.743, 0, -0.042, 0), 'Out', 'Bounce', 1)
wait(5)
debounce = false
end
end)
Report Abuse
Godlydeathdragon is not online. Godlydeathdragon
Joined: 08 Jun 2012
Total Posts: 50
24 Jul 2016 03:12 PM
bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image