#leaderstats

1 messages · Page 1 of 1 (latest)

charred plover
#

where is ball parented to and check output

strange canyon
#

i dont know]

#

i just did what i hought would work

charred plover
#

it's trying to find ball inside of hit.Parent, if it's not there then it skips the if statement

rapid shell
#
local Players = game:GetService("Players")

local convertor = workspace.MoneyConverter

local function onPlayerAdded(player)
  local folder = Instance.new("Folder")
  folder.Name = "leaderstats"
  folder.Parent = player

  local cash = Instance.new("IntValue")
  cash.Name = "Cash"
  cash.Parent = folder
  cash.Value = 0
end

Players.PlayerAdded:Connect(onPlayerAdded)

convertor.Touched:Connect(function(otherPart)
  local character = otherPart:GetPlayerFromCharacter(otherPart.Parent)
  if character then
      character.leaderstats.Cash.Value += 1
    end
end
#

@strange canyon

charred plover
#

this doesn't solve his issue

rapid shell
#

ohh, so if a ball touches the convertor it gets money/

#

?

strange canyon
#

yeah its supposed to give the player cash

#

ill give a vid

rapid shell
charred plover
#

it needs to be parented to the player's character

strange canyon
rapid shell
#

@strange canyon, why did u add the touch event on the leaderstats script?

#

Why not make them seperated?

strange canyon
#

i dont know dudecrying

charred plover
strange canyon
rapid shell
steady gull
charred plover
rapid shell
#

@strange canyon Player.leaderstats.Cash.Value += 1

charred plover
strange canyon
#

i did

rapid shell
charred plover
#

whether var = var + 1 or var += 1

strange canyon
#

but it just makes it shorter it dont fix anything?

charred plover
#

doesn't matter

#

look for the click dectector script and parent it to character there

rapid shell
strange canyon
#

no

#

im just messing around with my friend trying to learn how to script but dis aint workin

#

this is the button script

rapid shell
charred plover
#

^

#

and ballclone.Parent = player.Character

strange canyon
#

okay ill try

#

it dosent know what player is

charred plover
#

inside function(player)

strange canyon
#

can u send what i should do?

charred plover
strange canyon
#

okay

#

ty

rapid shell
charred plover
strange canyon
#

it dont work

frail cosmosBOT
#

studio** You are now Level 11! **studio

charred plover
rapid shell
strange canyon
charred plover
#

spelling error

#

Character

rapid shell
#

its fine

charred plover
strange canyon
#

ty

#

lol

#

still dont work

charred plover
#

gg

#

as much as i can tell you what's wrong, it is clear you lack basic fundamental knowledge of scripting, you can't help yourself at this stage

#

but that's fine, if you haven't watch the dev king beginners guide and advanced guide to scripting

#

should put you levels above this

strange canyon
#

u legit told me to do 7 differnet things and they all diddnt work so i think ur the only who lacks the knowledgecrying

#

but ok

charred plover
#

< 3

rapid shell
#

rx just gave u the final answer

strange canyon
rapid shell
charred plover
#

the name checks out

rapid shell
strange canyon
#

im 14

#

bud

charred plover
#

if you've wrote what you have soo far without ai at 14 that's pretty good for todays standard

#

just keep at it, and be attentive through the tutorials

strange canyon
#

dude ive written scripts much larger than this but this topic is smth i havent learnt?

warm island
#

yk what i mean

strange canyon
#

plus u cant solve it ither so i wouldnt be talking

rapid shell
strange canyon
rapid shell
strange canyon
warm island
rapid shell
rapid shell
strange canyon
rapid shell
strange canyon
charred plover
#

not to mention poorly organized code

rapid shell
charred plover
#

inefficient in the long run, you'll be fumbling over

rapid shell
#

and very repetitive.

strange canyon
#

not reading alat

#

yall are sum keyboard warriors

rapid shell
#

u gotta read.

strange canyon
#

no shit lil bro💀

#

seeing as u seem to never be able to shut ur mouth lets see sum of ur AMAZING✨ scripts hehe

charred plover
#

goodluck understanding this concept

strange canyon
#

i know how to clone buddy huhcrying

warm island
#

barbecue chicken alert

frail cosmosBOT
#

studio** You are now Level 3! **studio

strange canyon
#

barbecue chicken alert

rapid shell
strange canyon